-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Invalid integer comparison #11801
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
|
Perhaps we ought to deprecate the promotion from integers to floats, and just switch to object arrays instead. |
Comparison |
Sure, in this case I simply meant "we don't define it (yet)". |
Well, addition is ambiguous in case of overflow, but comparison is not ;-) |
My guess is that numpy is just looking at the types on either side of the operator, and finding a common type to promote them to. Numpy could have been smarter, noticed that this was a comparison operator, and not done that, but, hey, none of us are smart all of the time. |
Worse than that, the type of You're correct that comparison can be perfectly well-defined, but the C compiler won't define it for us sadly. |
With Python 3.7.0 and Numpy 1.15.0 (Anaconda version):
The text was updated successfully, but these errors were encountered: