-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Type promotion regression #73
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
Conversation
In particular, where the kind of the scalar is greater than the kind of the array.
Hmmm, there's still a bad corner case as follows:
Since 64-bit Linux has the integer as 64-bits, and t is a boolean kind, (1-t) becomes a 64-bit integer array. Since it's an array, now it doesn't trigger scalar_array rules, so (1-t)_a becomes float64 instead of float32. I think the categories for this should be reduced further from the three I did into just two: boolean/uint/int and float/complex, to fix this. |
Integer is still 32 bits on 64 bit Linux, it's the long that is 64. That doesn't affect the problem though ;) Numpy 1.5.x also behaves this way, so it is backward compatible. Something like (1 - t) should really be done as ~t to preserve the boolean type. |
I didn't do a change for the (1-t)*a corner case, since getting it to behave right in general requires some additional trickiness. I did put in a commented-out test for it, however. |
refactor: Optimize vuzp_s8
This is my fix for ticket #1798.