T
T.Crane
I'm new to python and I seem to get different behavior depending on...
well who knows what. Here's my question concerning importation of
packages/modules.
I want to use scipy. So at the prompt (using iPython, installed with
Enthought edition on Windows XP) I type:
ln [1]: from scipy import *
Now, I know integrate is a package this is in scipy. I want to use
the ode class/module that's in integrate. So I type:
ln [2]: from integrate import *
And I'm told
ImportError: No module named integrate
In order to get access to the ode class, I end up having to type:
ln [3]: from scipy.integrate import *
Then it works. Will someone explain to me what I'm misunderstanding?
I don't understand why after importing everything in scipy (which
includes integrate), I was told there was no module named integrate.
What gives? I there are sevarl functions (modules) that I want to use
that are a few levels down from the root package, what's the most
economical method of importing them?
Any clarification would be appreciated.
trevis
well who knows what. Here's my question concerning importation of
packages/modules.
I want to use scipy. So at the prompt (using iPython, installed with
Enthought edition on Windows XP) I type:
ln [1]: from scipy import *
Now, I know integrate is a package this is in scipy. I want to use
the ode class/module that's in integrate. So I type:
ln [2]: from integrate import *
And I'm told
ImportError: No module named integrate
In order to get access to the ode class, I end up having to type:
ln [3]: from scipy.integrate import *
Then it works. Will someone explain to me what I'm misunderstanding?
I don't understand why after importing everything in scipy (which
includes integrate), I was told there was no module named integrate.
What gives? I there are sevarl functions (modules) that I want to use
that are a few levels down from the root package, what's the most
economical method of importing them?
Any clarification would be appreciated.
trevis