eigvalsh¶
- eigvalsh(x: array, /) array ¶
Returns the eigenvalues of a symmetric matrix (or a stack of symmetric matrices)
x
.Note
The function
eigvals
will be added in a future version of the specification, as it requires complex number support.Note
Whether an array library explicitly checks whether an input array is a symmetric matrix (or a stack of symmetric matrices) is implementation-defined.
- Parameters:
x (array) – input array having shape
(..., M, M)
and whose innermost two dimensions form square matrices. Must have a floating-point data type.- Returns:
out (array) – an array containing the computed eigenvalues. The returned array must have shape
(..., M)
and have the same data type asx
... note:: – Eigenvalue sort order is left unspecified and is thus implementation-dependent.