I get an error when triyng to right_shift an array with numpy:
Here is the code:
import numpy as np
a = np.ones((10, 10)) * 64
a.astype("int16")
b = a >> 2
And I get
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''
But according to the docs, it seems to me this should work.
a = a.astype("int16")