jax.numpy.linalg.eigvalsh(a, UPLO='L')[source]ΒΆ

Compute the eigenvalues of a complex Hermitian or real symmetric matrix.

LAX-backend implementation of eigvalsh().

Original docstring below.

Main difference from eigh: the eigenvectors are not computed.

  • a ((.., M, M) array_like) – A complex- or real-valued matrix whose eigenvalues are to be computed.

  • UPLO ({'L', 'U'}, optional) – Specifies whether the calculation is done with the lower triangular part of a (β€˜L’, default) or the upper triangular part (β€˜U’). Irrespective of this value only the real parts of the diagonal will be considered in the computation to preserve the notion of a Hermitian matrix. It therefore follows that the imaginary part of the diagonal will always be treated as zero.


w – The eigenvalues in ascending order, each repeated according to its multiplicity.

Return type

(.., M,) ndarray