In Python, how can I raise a square matrix represented as a numpy.ndarray to non-integer powers?
问题 Assume I have a square matrix which can be raised to the -1/2 power. I want to raise the square matrix represented as a numpy.ndarray to -1/2. Note I want to raise the matrix to a non-integer power. I do not want raise each element of the matrix to a non-integer power. I know I can raise a matrix to an integer power using numpy.linalg.matrix_power as described in How to raise a numpy array to a power? How can I raise a numpy.ndarray to non-integer powers? 回答1: SciPy has scipy.linalg.sqrtm,