cupy.linalg.eigvals#
- cupy.linalg.eigvals(a)[source]#
Compute the eigenvalues of a matrix.
Main difference from eig: the eigenvectors are not computed.
- Parameters:
a (cupy.ndarray) – A symmetric 2-D square matrix
(M, M)
or a batch of symmetric 2-D square matrices(..., M, M)
.- Returns:
Returns eigenvalues as a vector
w
. For batch input,w[k]
is a vector of eigenvalues of matrixa[k]
.- Return type:
Notes
There is no guarantee of the order of the eigenvalues: it can even be different from
numpy.linalg.eigvals
.Warning
This function calls one or more cuSOLVER routine(s) which may yield invalid results if input conditions are not met. To detect these invalid results, you can set the linalg configuration to a value that is not ignore in
cupyx.errstate()
orcupyx.seterr()
.See also