[Numpy-discussion] TypeError: 'module' object is not callable

David Cournapeau david@silveregg.co...
Mon Jan 11 23:46:38 CST 2010


Jankins wrote:
> Thanks so much. I have successfully installed scipy in Ubuntu 9.10. But 
> I still couldn't use scipy.sparse.linalg.eigen function.

Please report *exactly* the suite of commands which is failing. For 
example, the following works for me:

import numpy as np
from scipy.sparse import csr_matrix
from scipy.sparse.linalg.eigen import eigen

m = np.random.randn(10, 10)
sm = csr_matrix(m)

print eigen(sm) # Give the 6 first (largest) eigen values of sm


Note that I am not sure eigen will be able to cope with your problem's 
size. I already had trouble with problems 1 to 2 order of magnitude 
smaller than that (~ 5e4 x 5e4)

cheers,

David


More information about the NumPy-Discussion mailing list