def eigvalsh(a, UPLO='<STR_LIT:L>'):
UPLO = UPLO.upper()<EOL>if UPLO not in ('<STR_LIT:L>', '<STR_LIT>'):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>extobj = get_linalg_error_extobj(<EOL>_raise_linalgerror_eigenvalues_nonconvergence)<EOL>if UPLO == '<STR_LIT:L>':<EOL><INDENT>gufunc = _umath_linalg.eigvalsh_lo<EOL><DEDENT>else:<EOL><INDENT>gufunc = _umath_linalg.eigvalsh_up<EOL><DEDENT>a, wrap = _makearray(a)<EOL>_assertNoEmpty2d(a)<EOL>_assertRankAtLeast2(a)<EOL>_assertNdSquareness(a)<EOL>t, result_t = _commonType(a)<EOL>signature = '<STR_LIT>' if isComplexType(t) else '<STR_LIT>'<EOL>w = gufunc(a, signature=signature, extobj=extobj)<EOL>return w.astype(_realType(result_t))<EOL>
Compute the eigenvalues of a Hermitian or real symmetric matrix.

Main difference from eigh: the eigenvectors are not computed.

Parameters
----------
a : (..., M, M) array_like
    A complex- or real-valued matrix whose eigenvalues are to be
    computed.
UPLO : {'L', 'U'}, optional
    Same as `lower`, with 'L' for lower and 'U' for upper triangular.
    Deprecated.

Returns
-------
w : (..., M,) ndarray
    The eigenvalues, not necessarily ordered, each repeated according to
    its multiplicity.

Raises
------
LinAlgError
    If the eigenvalue computation does not converge.

See Also
--------
eigh : eigenvalues and eigenvectors of symmetric/Hermitian arrays.
eigvals : eigenvalues of general real or complex arrays.
eig : eigenvalues and right eigenvectors of general real or complex
      arrays.

Notes
-----
Broadcasting rules apply, see the `numpy.linalg` documentation for
details.

The eigenvalues are computed using LAPACK routines _ssyevd, _heevd

Examples
--------
>>> from numpy import linalg as LA
>>> a = np.array([[1, -2j], [2j, 5]])
>>> LA.eigvalsh(a)
array([ 0.17157288+0.j,  5.82842712+0.j])