You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
r/l shift on uint64 scalar and python int failing #4151
np.array(123, dtype='uint64') >> 0
Traceback (most recent call last):
File "", line 1, in
TypeError: ufunc 'right_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
On 1.26 this raises a (conceptually correct) TypeError("ufunc 'right_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'"). Closing.
Activity
charris commentedon Feb 24, 2014
The problem is that an attempt is made cast the signed
0andunit64to a common type. The problem looks specific to array scalar typesDue to the difference in array/scalar and scalar/scalar casting rules. This isn't the only place this causes a problem.
ianwlarson commentedon Jul 28, 2017
This issue also affects me.
mattip commentedon Sep 18, 2023
On 1.26 this raises a (conceptually correct)
TypeError("ufunc 'right_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'"). Closing.