MCPcopy Create free account
hub / github.com/numpy/numpy / eigvalsh

Function eigvalsh

numpy/array_api/linalg.py:122–133  ·  view source on GitHub ↗

Array API compatible wrapper for :py:func:`np.linalg.eigvalsh `. See its docstring for more information.

(x: Array, /)

Source from the content-addressed store, hash-verified

120
121
122def eigvalsh(x: Array, /) -> Array:
123 """
124 Array API compatible wrapper for :py:func:`np.linalg.eigvalsh <numpy.linalg.eigvalsh>`.
125
126 See its docstring for more information.
127 """
128 # Note: the restriction to floating-point dtypes only is different from
129 # np.linalg.eigvalsh.
130 if x.dtype not in _floating_dtypes:
131 raise TypeError('Only floating-point dtypes are allowed in eigvalsh')
132
133 return Array._new(np.linalg.eigvalsh(x._array))
134
135def inv(x: Array, /) -> Array:
136 """

Callers

nothing calls this directly

Calls 1

_newMethod · 0.80

Tested by

no test coverage detected