chainerx.linalg.eigvalsh

chainerx.linalg.eigvalsh(a, UPLO='L')

Compute the eigenvalues of a real symmetric matrix.

Main difference from eigh: the eigenvectors are not computed.

Parameters
  • a (ndarray) – Real symmetric matrix whose eigenvalues and eigenvectors are to be computed.

  • UPLO (str) – Specifies whether the calculation is done with the lower triangular part of a (‘L’, default) or the upper triangular part (‘U’). (optional).

Returns

Returns eigenvalues as a vector.

Return type

ndarray

Note

  • The dtype must be float32 or float64 (float16 is not supported yet.)

  • Backpropagation requires eigenvectors and, therefore, is not implemented for this function. linalg.eigh should be used instead.