Reputation: 111
The documentation of scipy.sparse.linalg.eigs reads
The number of eigenvalues and eigenvectors desired. k must be smaller than N-1. It is not possible to compute all eigenvectors of a matrix.
Why can it not compute all eigenvalues? This is possible for standard (non-sparse) matrices.
Upvotes: 1
Views: 777
Reputation: 3437
The docs also say:
This function is a wrapper to the ARPACK SNEUPD, DNEUPD, CNEUPD, ZNEUPD, functions which use the Implicitly Restarted Arnoldi Method to find the eigenvalues and eigenvectors.
Digging into the ARPACK docs, the description of the algorithm says:
The algorithm is capable of computing a few (k) eigenvalues with user specified features such as largest real part or largest magnitude using storage.
So this is a limitation of the algorithm, as explained by the Wikipedia:
The Arnoldi method belongs to a class of linear algebra algorithms that give a partial result after a small number of iterations, in contrast to so-called direct methods which must complete to give any useful results.
Upvotes: 2