Closed
Description
>>> np.matrix(np.eye(3)) ** np.uint8(1)
Traceback (most recent call last):
File "<pyshell#53>", line 1, in <module>
np.matrix(np.eye(3)) ** np.uint8(1)
File "C:\Users\wiese\AppData\Roaming\Python\Python35\site-packages\numpy\matrixlib\defmatrix.py", line 356, in __pow__
return matrix_power(self, other)
File "C:\Users\wiese\AppData\Roaming\Python\Python35\site-packages\numpy\matrixlib\defmatrix.py", line 175, in matrix_power
raise TypeError("exponent must be an integer")
TypeError: exponent must be an integer
Caused by subdtype(x, Int)
meaning subdtype(x, np.unsigned_integer)
.
Can we change the meaning to np.integer
, or is it too late, and we should just deprecate this shorthand?