[SciPy-User] Strange import behaviour
Carlos Baptista
aeronaelius at gmail.com
Sat Aug 18 19:07:29 EDT 2012
Dear all,
I have come across a very strange behaviour of Scipy. It has to do with
importing and using Scipy functions.
For example, this works:
>>> import scipy.sparse as ss
>>> ss
<module 'scipy.sparse' from
'/usr/lib/python2.7/dist-packages/scipy/sparse/__init__.pyc'>
However this does not work:
>>> import scipy as sp
>>> sp.sparse
Traceback (most recent call last):
File "<ipython-input-2-0c35c470f8a4>", line 1, in <module>
sp.sparse
AttributeError: 'module' object has no attribute 'sparse'
The above example is merely a condensation of my real problem (using
spsolve from scipy.sparse.linalg). What might cause this problem?
Kind regards,
Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20120819/8368a1ca/attachment.html>
More information about the SciPy-User
mailing list