This is documentation for an old release of SciPy (version 0.12.0). Read this page in the documentation of the latest stable release (version 1.15.1).
Find k eigenvalues and eigenvectors of the square matrix A.
Solves A * x[i] = w[i] * x[i], the standard eigenvalue problem for w[i] eigenvalues with corresponding eigenvectors x[i].
If M is specified, solves A * x[i] = w[i] * M * x[i], the generalized eigenvalue problem for w[i] eigenvalues with corresponding eigenvectors x[i]
Parameters : | A : ndarray, sparse matrix or LinearOperator
k : int, optional
M : ndarray, sparse matrix or LinearOperator, optional
sigma : real or complex, optional
v0 : ndarray, optional
ncv : int, optional
which : str, [‘LM’ | ‘SM’ | ‘LR’ | ‘SR’ | ‘LI’ | ‘SI’], optional
maxiter : int, optional
tol : float, optional
return_eigenvectors : bool, optional
Minv : ndarray, sparse matrix or LinearOperator, optional
OPinv : ndarray, sparse matrix or LinearOperator, optional
OPpart : {‘r’ or ‘i’}, optional
|
---|---|
Returns : | w : ndarray
v : ndarray
|
Raises : | ArpackNoConvergence :
|
See also
Notes
This function is a wrapper to the ARPACK [R140] SNEUPD, DNEUPD, CNEUPD, ZNEUPD, functions which use the Implicitly Restarted Arnoldi Method to find the eigenvalues and eigenvectors [R141].
References
[R140] | (1, 2) ARPACK Software, http://www.caam.rice.edu/software/ARPACK/ |
[R141] | (1, 2) R. B. Lehoucq, D. C. Sorensen, and C. Yang, ARPACK USERS GUIDE: Solution of Large Scale Eigenvalue Problems by Implicitly Restarted Arnoldi Methods. SIAM, Philadelphia, PA, 1998. |
Examples
Find 6 eigenvectors of the identity matrix:
>>> id = np.eye(13)
>>> vals, vecs = sp.sparse.linalg.eigs(id, k=6)
>>> vals
array([ 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j])
>>> vecs.shape
(13, 6)