DynamicsAndNeuralSystems / DynamicsAndNeuralSystems/pycatch22
co_autocorrs NAN issue
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 103
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
I was testing what happened when you insert an array of just 0's into pycatch22 and its local C file. Functions that use co_autocorrs, such as Co_firstmin and co_f1, will face a division by zero error and therefore return NaN as a complex number, this happens when dividing F by the divisor.
However, what I found interesting is that running these functions on pycatch22 will return 0, while if you run them locally on C it returns the length of the array. Is this discrepancy happening due to the python wrapper (python_wrapper_int)?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing co_autocorrs and the python_wrapper_int path used by Co_firstmin and co_f1 on an all-zero array. Reproduce the result in pycatch22 and local C, then determine why one returns 0 while the other returns the array length; done means the discrepancy is explained and the behavior is made consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100