bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / linalg / _matfuncs / signm
function
scipy.linalg._matfuncs:signm
source: build-install/usr/lib/python3.14/site-packages/scipy/linalg/_matfuncs.py:778
Signature
def signm(A)Summary
Matrix sign function.
Extended Summary
Extension of the scalar sign(x) to matrices.
The documentation is written assuming array arguments are of specified "core" shapes. However, array argument(s) of this function may have additional "batch" dimensions prepended to the core shape. In this case, the array is treated as a batch of lower-dimensional slices; see linalg_batch for details. The NEP 5 signature of this function is (i,i)->(i,i).
Parameters
A: (N, N) array_likeMatrix at which to evaluate the sign function
Returns
signm: (N, N) ndarrayValue of the sign function at
A
Examples
from scipy.linalg import signm, eigvals a = [[1,2,3], [1,2,1], [1,1,1]]✓
eigvals(a)
✗array([ 4.125+0.j, -0.762+0.j, 0.637+0.j])
eigvals(signm(a))
✓array([-1.+0.j, 1.+0.j, 1.+0.j])
Aliases
scipy.linalg.signm