speigsh
full name: tenpy.tools.math.speigsh
parent module:
tenpy.tools.math
type: function
- tenpy.tools.math.speigsh(A, k, *args, **kwargs)[source]
Wrapper around
scipy.sparse.linalg.eigsh()
, lifting the restrictionk < rank(A)-1
.- Parameters:
A (MxM ndarray or like
scipy.sparse.linalg.LinearOperator
) – The (square) hermitian linear operator for which the eigenvalues should be computed.k (int) – The number of eigenvalues to be computed.
*args – Further arguments directly given to
scipy.sparse.linalg.eigsh()
.**kwargs – Further keyword arguments directly given to
scipy.sparse.linalg.eigsh()
.
- Returns:
w (ndarray) – Array of min(k, A.shape[0]) eigenvalues.
v (ndarray) – Array of min(k, A.shape[0]) eigenvectors,
v[:, i]
is the i-th eigenvector. Only returned ifkwargs['return_eigenvectors'] == True
.