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
"invalid value encountered in left_shift" for broadcasted int16 array #18986
Comments
This sounds either like a clang bug, or a duplicate of #18005. EDIT: Unless we have SIMD here and that is related, but I doubt it? |
I just tested on Linux ( |
#19049 doesn't seem to have fixed this, so I guess it was a different issue. |
I confirmed that clang-10 also sets the invalid flag with this code. It is coming from a numpy/numpy/core/src/umath/loops.c.src Line 672 in 36cc9be
The invalid flag is currently suppressed for INT and UINT. Would it be appropriate to extend this to other integer types as well? |
Reproducing code example:
For some reason,
np.left_shift(np.array([0], dtype=np.int16), np.array([[31, 31, 31], [31, 31, 31], [31, 31, 31]], dtype=np.int16))
gives a floating point warning, but similar function calls do not.Error message:
NumPy/Python version information:
The text was updated successfully, but these errors were encountered: