[SciPy-user] scipy.sparse.linalg.eigen inconsistency

James Philbin philbinj@gmail....
Fri Oct 10 11:17:51 CDT 2008


Hi,

This doesn't work:
In [19]: spspla.eigen(np.array([[1.0]]),k=1)
---------------------------------------------------------------------------
<type 'exceptions.ValueError'>            Traceback (most recent call last)

/home/james/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py
in eigen(A, k, M, sigma, which, v0, ncv, maxiter, tol,
return_eigenvectors)
    163         raise ValueError("k must be positive, k=%d"%k)
    164     if k == n:
--> 165         raise ValueError("k must be less than rank(A), k=%d"%k)
    166     if maxiter <= 0:
    167         raise ValueError("maxiter must be positive, maxiter=%d"%maxiter)

<type 'exceptions.ValueError'>: k must be less than rank(A), k=1

It should find the eigenvector [[1.0]] with eigenvalue 1.0.

James


More information about the SciPy-user mailing list