[SciPy-User] raising a matrix to float power
Sat Jul 10 18:45:36 CDT 2010
On Sat, Jul 10, 2010 at 7:39 PM, Sturla Molden <email@example.com> wrote:
> Alexey Brazhe skrev:
>> I failed to find a way to raise a matrix to a non-integer power in
>> In Octave/Matlab, one would write M^0.5 to get the result
>> whereas in numpy
>> >>> maxtrix(M, 0.5)
>> raises the "TypeError: exponent must be an integer"
>> Is there a way to do matrix exponentiation to non-integer powers in
>> numpy or scipy?
>> Hope the answer is positive :)
> Sure, M**0.5 is cho_factor(M). For other non-integers I am not sure what
> matrix exponentiation could possibly mean.
> Are you sure you don't mean array exponentiation?
scipy linalg has several matrix functions 'expm', 'expm2', 'expm3',
'sqrtm' solves dot(B,B) = A not dot(B.T,B) = A
Besides cholesky, I use eigenvector decomposition to get the powers
and other functions.
> SciPy-User mailing list
More information about the SciPy-User