mathnumpyscipyarpack

Scipy arpack eigs versus eigsh number of eigenvalues


In scipy's ARPACK bindings, one cannot calculate all of the eigenvalues of a matrix. However, I find that eigsh is able to calculate n - 1 eigenvalues, while eigs is only able to calculate n - 2 eigenvalues. Can anyone verify that this is in fact a fundamental limitation of ARPACK and not a bug in scipy?

Here is example code:

import scipy.sparse, scipy.sparse.linalg
t = scipy.sparse.eye(3,3).tocsr()
l,v = scipy.sparse.linalg.arpack.eigs(t,k=2)
l,v = scipy.sparse.linalg.arpack.eigsh(t,k=2)

Solution

  • It's ARPACK limitation:

    http://forge.scilab.org/index.php/p/arpack-ng/source/tree/master/SRC/dnaupd.f

    http://forge.scilab.org/index.php/p/arpack-ng/source/tree/master/SRC/dsaupd.f

    Would be a strange bug to get this wrong...