[SciPy-user] function for sqrt of matrix

Nils Wagner nwagner at mecha.uni-stuttgart.de
Mon Jul 5 03:47:05 CDT 2004


Travis E. Oliphant wrote:
> Sudheer Phani wrote:
> 
>> Hello
>>
>>    I am looking for a function to calculate the square root (sqrt) of
>> matrix M. For e.g. x = sqrtm(M) such that M is square matrix and dot(x,x)
>> = M.
>>
> In SciPy:
> 
> It would be good to have a specific sqrtm function.
> 
> But for now you can do:
> 
> x = linalg.funm(M, sqrt)
> 
> 
> or
> 
> def sqrtm(M):
>     return linalg.funm(M,sqrt)
> 
> x = sqrtm(M)
> 
> 
> -Travis O.
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
> 

Very useful algorithms for sqrtm are available
via http://www.ma.man.ac.uk/~higham/pap-mf.html

Nils



More information about the SciPy-user mailing list