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.
- Parameters
a (cupy.ndarray) – A symmetric 2-D square matrix
(M, M)or a batch of symmetric 2-D square matrices(..., M, M).UPLO (str) – Select from
'L'or'U'. It specifies which part ofais used.'L'uses the lower triangular part ofa, and'U'uses the upper triangular part ofa.
- Returns
Returns a tuple
(w, v).wcontains eigenvalues andvcontains eigenvectors.v[:, i]is an eigenvector corresponding to an eigenvaluew[i]. For batch input,v[k, :, i]is an eigenvector corresponding to an eigenvaluew[k, i]ofa[k].- Return type
tuple of
ndarray
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