-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
histogram crashes cryptically with single float bin #8072
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
Comments
In master this raises an a somewhat better, but totally misleading, error
|
Just a side comment, I just noticed (after wondering about whether a change in python would make sense), that this is actually changed in python, so that it does say "integer" instead of the confusing "index in python 3.5 (probably earlier, thought not my python 2.7). |
Now raises |
Split up the overloaded `bins` variable into separate names depending on its meaning Helpful errors are now emitted for: * non-integer bin counts (fixes numpygh-8072) * non-1d bin edges Removes another use of `np.isscalar`...
This code:
np.histogram(np.random.random(1000), bins=100.1) # Crashes
works fine with python3.4 & numpy 1.9.2. However it crashes with 3.5.2 & numpy 1.11.1 with the following error msg:
I know that bins should be int, but I would suggest either better error message or floor/ceil to make it int like in 1.9.2
The text was updated successfully, but these errors were encountered: