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
numpy unexpectedly raises zero division error if array is long enough #11051
Comments
I cannot reproduce this. What platform? |
Sorry for not mentioning, |
What do you get when you run |
|
How do you get Anaconda on windows 10 compiled with GCC 7.2.0? Is that standard? I thought they use MSVC? |
My bad, I've mixed terminals. I have double checked and I'm also not able to reproduce it on Windows. |
Hi! Any update on that issue? I'm getting this error also with newer versions of Python: |
I still cannot reproduce this, so it is hard to debug :) |
Anyone out there running ubuntu who can check this? |
I don't see anything suspicious between NumPy 1.14.1 and 1.14.2
|
Maybe Ananconda switched compilers / mkl libraries. Please check with them. |
@evfro, @oleksandr-pavlyk can we close this? |
I've found a workaround and not using the lines of code that generate that issue.
|
Yes, it is still reproducible:
It is coming from use of MKL VML function One can turn errors off by using
See https://software.intel.com/en-us/mkl-developer-reference-c-vmlsetmode for more details You can restore the VML behavior with
|
NumPy specifically resets the error state when it is obvious (by emitting NAN) that divide-by-zero occurred. I think the MKL port should do the same inside the ufuncs without requiring global error mode control. |
Closing, as it seems this is a "won't fix" from the mkl port of NumPy. Please reopen if there is something actionable NumPy can do. |
Thanks a lot for explaining that. It's so hard to find relevant information since too many webpages are about real zero-division cases. I ran into this issue as well and it only occurs with |
Nowadays implementations of universal functions that use MKL VML has all been moved to The ufunc loops for certain types are registered with NumPy's universal functions via One can deregister these loops using |
Steps to reproduce:
output:
divide by zero encountered in true_divide at size 8001
numpy version:
1.14.2
Seems like this bug was introduced just recently, as there is no such issue with
1.13.3
and1.14.1
.The text was updated successfully, but these errors were encountered: