numpy.linalg.eigvalsh

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

Compute the eigenvalues of a Hermitean or real symmetric matrix.

Parameters:

a : array_like, shape (M, M)

A complex or real matrix whose eigenvalues and eigenvectors will be computed.

UPLO : {‘L’, ‘U’}, optional

Specifies whether the calculation is done with data from the lower triangular part of a (‘L’, default) or the upper triangular part (‘U’).

Returns:

w : ndarray, shape (M,)

The eigenvalues, each repeated according to its multiplicity. They are not necessarily ordered.

Raises:

LinAlgError :

If the eigenvalue computation does not converge.

See also

eigh
eigenvalues and eigenvectors of symmetric/Hermitean arrays.
eigvals
eigenvalues of general real or complex arrays.
eig
eigenvalues and eigenvectors of general real or complex arrays.

Notes

This is a simple interface to the LAPACK routines dsyevd and zheevd that sets the flags to return only the eigenvalues of real symmetric and complex Hermetian arrays respectively.

The number w is an eigenvalue of a if there exists a vector v satisfying the equation dot(a,v) = w*v. Alternately, if w is a root of the characteristic equation det(a - w[i]*I) = 0, where det is the determinant and I is the identity matrix.

Previous topic

numpy.linalg.eigvals

Next topic

numpy.linalg.norm

This Page

Quick search