[Numpy-discussion] passing "import numpy as np" as python command arg in 'doze

Skipper Seabold jsseabold@gmail....
Fri Aug 14 16:20:35 CDT 2009


On Fri, Aug 14, 2009 at 5:16 PM, David Goldsmith<d_l_goldsmith@yahoo.com> wrote:
> Hi!  Please remind: running python in the Windows Terminal (DOS command prompt), how does one pass the command "import numpy as np"?  I tried 'python "import numpy as np"', to no avail.
>

Is this what you want?

In a linux terminal

python -c "import numpy as np; print np.ones(5)"

http://docs.python.org/using/cmdline.html

Skipper


More information about the NumPy-Discussion mailing list