[SciPy-user] Right way to import scipy
wbaxter at gmail.com
Mon Feb 20 22:25:18 CST 2006
On 2/21/06, Robert Kern <robert.kern at gmail.com> wrote:
> Bill Baxter wrote:
> > Is this a bug? I would like to add info about getting at these
> > functions to the Scipy for Matlab Users wiki page, but I'd like to know
> > first if
> > A) this is the expected behavior, or just a bug and
> It's expected if you know what's going on, but not really desirable.
> scipy/__init__.py does a "from numpy import *" which is pulling in the
> package. I'm pretty sure we don't want that. In fact, we already have a
> lib" statement to clear that conflicting module, so we should just add a
> linalg" statement, too.
Thanks for the explanation.
> B) if these import statements are really the best way to get at
> > scipy.linalg.lu <http://scipy.linalg.lu> et al.
> > import numpy as N
> > import scipy as S
> > from scipy.linalg import lu
> Yup. Or just:
> from scipy.linalg import lu
> or even:
> from scipy import linalg
That last one doesn't work:
[starting from a clean environment[
>>> from scipy import linalg
Traceback (most recent call last):
File "<input>", line 1, in ?
AttributeError: 'module' object has no attribute 'lu'
>>> from scipy import version
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user