[Numpy-discussion] Matrix square root

Andrew Nesbit alnesbit at students.cs.mu.OZ.AU
Thu Sep 4 09:05:18 EDT 2003


Konrad Hinsen <hinsen at cnrs-orleans.fr> writes:

> On Thursday 04 September 2003 16:42, Andrew Nesbit wrote:
>> I need a function equivalent to Matlab's sqrtm, i.e., a square root
>> for matrices.

[snip]

> I'd use an eigenvalue decomposition, then take the square root of the 
> eigenvalues, and then apply the diagonlization matrix in reverse. If you 
> convert to eigenvalues to complex before taking the square root, this will 
> work for non-positive-definite matrices, yielding a complex result.

Thankyou for the advice.  This gives me a good starting point.

Andrew.





More information about the NumPy-Discussion mailing list