[SciPy-dev] Import strategy

Nils Wagner nwagner at mecha.uni-stuttgart.de
Mon Jan 9 04:40:23 CST 2006


Pearu Peterson wrote:
>On Mon, 9 Jan 2006, Nils Wagner wrote:
>
>  
>>Traceback (most recent call last):
>> File "import.py", line 5, in ?
>>   a_logm = linalg.logm(a)
>>AttributeError: 'module' object has no attribute 'logm'
>>    
>
>What linalg module are you using in import.py? May be it comes from
>numpy? How do you import scipy/numpy in import.py?
>
>Otherwise
>
>  
>>>>from scipy import *
>>>>linalg.logm
>>>>        
><function logm at 0x40cf08ec>
>
>works fine here.
>
>Pearu
>
>_______________________________________________
>Scipy-dev mailing list
>Scipy-dev at scipy.net
>http://www.scipy.net/mailman/listinfo/scipy-dev
>  
Strange. Here I get

from scipy import *
...
Overwriting linalg=<module 'scipy.basic.linalg' from
'/usr/local/lib/python2.4/site-packages/scipy/basic/linalg.pyc'> from
/usr/local/lib/python2.4/site-packages/scipy/basic/linalg.pyc (was
<module 'scipy.linalg' from
'/usr/local/lib/python2.4/site-packages/scipy/linalg/__init__.pyc'> from
/usr/local/lib/python2.4/site-packages/scipy/linalg/__init__.pyc)
Overwriting fftpack=<module 'scipy.basic.fftpack' from
'/usr/local/lib/python2.4/site-packages/scipy/basic/fftpack.pyc'> from
/usr/local/lib/python2.4/site-packages/scipy/basic/fftpack.pyc (was
<module 'scipy.fftpack' from
'/usr/local/lib/python2.4/site-packages/scipy/fftpack/__init__.pyc'>
from /usr/local/lib/python2.4/site-packages/scipy/fftpack/__init__.pyc)
>>> linalg.logm
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'logm'
>>> import numpy
>>> numpy.__version__
'0.9.3.1860'
>>> import scipy
>>> scipy.__version__
'0.4.4.1540'


BTW, I haven't uninstalled the "old" core but installed numpy.

Nils




More information about the Scipy-dev mailing list