On 04/29/2013 12:30 PM, Peter Rowat wrote:
This must be a trivial question:
I have "import numpy as np" in the python startup file.
A file called mod1.py contains "def myfn..."
and inside myfn there is a call to, say, "np.convolve".
Interactively:
python
(numpy imported as np)
impor
On 04/29/2013 04:03 PM, Dave Angel wrote:
Please ignore my previous response, obviously I misread your question
entirely. I've never used a startup file, so I misread it as "script file".
Yes, you need a separate import from any module that references numpy.
Don't worry about performance, s
On 04/29/2013 03:30 PM, Peter Rowat wrote:
This must be a trivial question:
I have "import numpy as np" in the python startup file.
A file called mod1.py contains "def myfn..."
and inside myfn there is a call to, say, "np.convolve".
Interactively:
python
(numpy imported as np)
impor
On 4/29/2013 3:30 PM, Peter Rowat wrote:
This must be a trivial question:
I have "import numpy as np" in the python startup file.
A file called mod1.py contains "def myfn..."
and inside myfn there is a call to, say, "np.convolve".
Interactively:
python
(numpy imported as np)
import
On Mon, 29 Apr 2013 12:30:29 -0700, Peter Rowat wrote:
> This must be a trivial question:
>
> I have "import numpy as np" in the python startup file.
That only runs interactively. It does not run when you execute a script.
> A file called mod1.py contains "def myfn..."
> and inside myfn there
This must be a trivial question:
I have "import numpy as np" in the python startup file.
A file called mod1.py contains "def myfn..."
and inside myfn there is a call to, say, "np.convolve".
Interactively:
>python
(numpy imported as np)
>import mod1
>
>mod1.myfn(...)
Error: global name "n