cupy.linalg.eigh¶
-
cupy.linalg.
eigh
(a, UPLO='L')[source]¶ Eigenvalues and eigenvectors of a symmetric matrix.
This method calculates eigenvalues and eigenvectors of a given symmetric matrix.
Note
Currenlty only 2-D matrix is supported.
Note
CUDA >=8.0 is required.
Parameters: - a (cupy.ndarray) – A symmetric 2-D square matrix.
- UPLO (str) – Select from
'L'
or'U'
. It specifies which part ofa
is used.'L'
uses the lower triangular part ofa
, and'U'
uses the upper triangular part ofa
.
Returns: Returns a tuple
(w, v)
.w
contains eigenvalues andv
contains eigenvectors.v[:, i]
is an eigenvector corresponding to an eigenvaluew[i]
.Return type: tuple of
ndarray
See also