[SciPy-User] scipy.sparse.linalg.lobpcg broken?

Nico Schlömer nico.schloemer@gmail....
Wed Oct 13 09:21:21 CDT 2010


Hi,

I thought I give lobpcg a shot, and tried

====================== *snip* ======================
from scipy.sparse.linalg import lobpcg
from scipy.sparse import identity
import numpy as np

n = 10
X = np.zeros( (n,1) )
A = identity( n )
lobpcg( A, X )
====================== *snap* ======================

On my machine, this yields

====================== *snip* ======================
Traceback (most recent call last):
  File "logpcg_test.py", line 8, in <module>
    lobpcg( A, X )
  File "/usr/lib64/python2.6/site-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py",
line 304, in lobpcg
    blockVectorX, blockVectorBX = b_orthonormalize( B, blockVectorX )
  File "/usr/lib64/python2.6/site-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py",
line 130, in b_orthonormalize
    gramVBV = sla.cholesky( gramVBV )
  File "/usr/lib64/python2.6/site-packages/scipy/linalg/decomp_cholesky.py",
line 66, in cholesky
    c, lower = _cholesky(a, lower=lower, overwrite_a=overwrite_a, clean=True)
  File "/usr/lib64/python2.6/site-packages/scipy/linalg/decomp_cholesky.py",
line 24, in _cholesky
    raise LinAlgError("%d-th leading minor not positive definite" % info)
numpy.linalg.linalg.LinAlgError: 1-th leading minor not positive definite
====================== *snap* ======================

Fail!

Am I missing a library, or is that routine broken?

Cheers,
Nico


More information about the SciPy-User mailing list