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

Jankins andyjian430074@gmail....
Tue Jan 12 00:35:55 CST 2010


Here is the complete command lines in Windows 7:

C:\Users\jankins>python
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit 
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> from scipy.sparse.linalg.eigen import eigen
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: cannot import name eigen
 >>>

Here is the complete command lines in Ubuntu 9.10:

Python 2.6.4 (r264:75706, Nov  2 2009, 14:38:03)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> from scipy.sparse.linalg.eigen import eigen
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: cannot import name eigen
 >>>

It's so wired.

Thanks.

On 1/11/2010 11:46 PM, David Cournapeau wrote:
> 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
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>    



More information about the NumPy-Discussion mailing list