[SciPy-user] Matrix sign function
Pearu Peterson
pearu at scipy.org
Wed Sep 24 05:39:05 EDT 2003
On Wed, 24 Sep 2003, Nils Wagner wrote:
> It would be nice to have the matrix sign function in scipy.
Try the following:
signm=lambda a:linalg.funm(a,lambda v:sign(v)+0j)
This assumes that `a` has real eigenvalues. Otherwise one most use some
other sign function that is properly defined for complex values, the
current sign is acctually
v |-> sign(real(v))
Pearu
More information about the SciPy-User
mailing list