Skip to content

Commit

Permalink
Long is not a subdtype of 'int' on IronPython.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason McCampbell (Enthought, Inc) committed Mar 17, 2011
1 parent b92fbb6 commit 06d3320
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numpy/matrixlib/defmatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ def matrix_power(M,n):
M = asanyarray(M)
if len(M.shape) != 2 or M.shape[0] != M.shape[1]:
raise ValueError("input must be a square array")
if not issubdtype(type(n),int):
# Note: need to check int and long for IronPython because 'long' is not a subdtype of 'int'.
if not issubdtype(type(n),int) and not issubdtype(type(n), long):
raise TypeError("exponent must be an integer")

from numpy.linalg import inv
Expand Down

0 comments on commit 06d3320

Please sign in to comment.