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

Jankins andyjian430074@gmail....
Tue Jan 12 09:11:57 CST 2010


 >>> import scipy.sparse.linalg as linalg
 >>> dir(linalg)
['LinearOperator', 'Tester', '__all__', '__builtins__', '__doc__', 
'__file__', '
__name__', '__package__', '__path__', 'aslinearoperator', 'bench', 
'bicg', 'bicg
stab', 'cg', 'cgs', 'dsolve', 'eigen', 'factorized', 'gmres', 
'interface', 'isol
ve', 'iterative', 'linsolve', 'lobpcg', 'minres', 'qmr', 'splu', 
'spsolve', 'tes
t', 'umfpack', 'use_solver', 'utils']
 >>> dir(linalg.eigen)
['Tester', '__all__', '__builtins__', '__doc__', '__file__', '__name__', 
'__pack
age__', '__path__', 'bench', 'lobpcg', 'test']
 >>> linalg.eigen.test()
Running unit tests for scipy.sparse.linalg.eigen
NumPy version 1.3.0
NumPy is installed in C:\Python26\lib\site-packages\numpy
SciPy version 0.7.1
SciPy is installed in C:\Python26\lib\site-packages\scipy
Python version 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 
bit (Int
el)]
nose version 0.11.1
..........
----------------------------------------------------------------------
Ran 10 tests in 2.240s

OK
<nose.result.TextTestResult run=10 errors=0 failures=0>
 >>>



On 1/12/2010 8:15 AM, Alan G Isaac wrote:
> On 1/12/2010 1:35 AM, Jankins wrote:
>    
>>>>>   from scipy.sparse.linalg.eigen import eigen
>>>>>            
>> Traceback (most recent call last):
>>      File "<stdin>", line 1, in<module>
>> ImportError: cannot import name eigen
>>      
>
> Look at David's example:
> from scipy.sparse.linalg import eigen
>
> hth,
> Alan Isaac
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>    



More information about the NumPy-Discussion mailing list