diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-08-01 17:39:11 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-08-05 21:49:34 -0500 |
commit | 6a119c982463097aebc8d004fc731b424721a650 (patch) | |
tree | 581c81d6b36517f6e0cf4b3ad8a41f21aaed9b97 /numpy/matrixlib/defmatrix.py | |
parent | bfe43b26969231cfe8196868280c07f0c0aa8f50 (diff) | |
download | numpy-6a119c982463097aebc8d004fc731b424721a650.tar.gz |
BUG: Be explicit about allowing all integer types in matrix exponentiation
Fixes gh-9506, unsigned exponentiation
Diffstat (limited to 'numpy/matrixlib/defmatrix.py')
-rw-r--r-- | numpy/matrixlib/defmatrix.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/matrixlib/defmatrix.py b/numpy/matrixlib/defmatrix.py index 2aed3ebde..e016b5f4c 100644 --- a/numpy/matrixlib/defmatrix.py +++ b/numpy/matrixlib/defmatrix.py @@ -137,7 +137,7 @@ def matrix_power(M, n): M = asanyarray(M) if M.ndim != 2 or M.shape[0] != M.shape[1]: raise ValueError("input must be a square array") - if not issubdtype(type(n), int): + if not issubdtype(type(n), N.integer): raise TypeError("exponent must be an integer") from numpy.linalg import inv |