There is no guarantee that the total nx n-matrix can be raised to a given non-integer power. This operation is well defined for positive integer powers, and using the Maclaurin series you can then determine the matrix exponential function to approximate other matrix functions.
However, in order to be able to raise the matrix to arbitrary power, you must also have a consistent definition of the matrix logarithm, which is only well defined for invertible matrices and includes some subtlety about the uniqueness and field of elements over which it is defined.
This is well described in this math.stackexchange.com answer .
So, in the general case, this is not a well-defined operation on arbitrary nxn matrices, and therefore it will not make sense as a public function on ndarray .
He would like to request a function called " inverse " that calculates the inverse (not psuedo-inverse or any approximation, but the "actual" inverse) for arbitrary 2D arrays. Such a function cannot exist at all, since there are irreversible two-dimensional arrays.
This is a bit of a solution by the Parochial API about whether there is some function that tries to compute it and simply throws an exception if it can detect an invalid input argument, for example numpy.linalg.inv , or simply does not provide this functionality and the user should expect write your own function to do this, and handle argument validation, throwing exceptions, or any other behavior in case of failure.
inv is ubiquitous enough to guarantee this effort, while arbitrary powers outside the box are not.
ely source share