New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
examples/stats_tuning example does not work #6
Comments
I have installed cochlea on Ubuntu and trying to run stats_tuning.py. This gives a strange error as follows. I havn't changed any code.
ERROR STACK -
Traceback (most recent call last):
File "stats_tuning.py", line 41, in <module>
main()
File "stats_tuning.py", line 24, in main
model_pars={'species': 'human'}
File "/usr/local/lib/python3.6/dist-packages/cochlea/stats/tuning.py", line 53, in calc_tuning
**model_pars=model_pars**
File "/usr/local/lib/python3.6/dist-packages/thorns/util/maps.py", line 387, in wrap
result = func(**kwargs)
File "/usr/local/lib/python3.6/dist-packages/cochlea/stats/threshold_rate.py", line 88, in calc_spont_threshold
silence = np.zeros(fs*tmax)
TypeError: 'float' object cannot be interpreted as an integer
1. This particular error has been fixed in the repository. I'll bump
the version and upload to PyPI later this week. If you don't want to
wait, you can run the version from the master.
2. It looks that you are using Python 3.6, but cochlea was only tested
on Python 2.7. You might encounter some problems with that. In this
case I would recommend to use Python 2.7. Either case, I would like to
know how did it go. :-)
|
Yes I realized the python 3.6 related issue and made a small fix in my local code. Those worked for me very well. (Thanks for your prompt response.)
In Thorns |
Thank for the feedback. I've just uploaded the most recent versions to
PyPI.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have installed cochlea on Ubuntu and trying to run stats_tuning.py. This gives a strange error as follows. I havn't changed any code.
ERROR STACK -
Traceback (most recent call last):
File "stats_tuning.py", line 41, in
main()
File "stats_tuning.py", line 24, in main
model_pars={'species': 'human'}
File "/usr/local/lib/python3.6/dist-packages/cochlea/stats/tuning.py", line 53, in calc_tuning
model_pars=model_pars
File "/usr/local/lib/python3.6/dist-packages/thorns/util/maps.py", line 387, in wrap
result = func(**kwargs)
File "/usr/local/lib/python3.6/dist-packages/cochlea/stats/threshold_rate.py", line 88, in calc_spont_threshold
silence = np.zeros(fs*tmax)
TypeError: 'float' object cannot be interpreted as an integer
The text was updated successfully, but these errors were encountered: