[Numpy-discussion] confusion on importing numpy

mark markbak at gmail.com
Wed Aug 6 06:00:41 EDT 2008


Hello list. I am confused about importing numpy.

When I do

from numpy import *

and I try the min function, I get the default Python min function.

On the other hand, when I do

import numpy as np

and use the np.min function, I get the numpy min function (which is
obviously what I want).

I know, the latter is preferred, but the former is so dang easy to
type.
I always thought both imports work the same, but I am obviously wrong.
What's the difference?

Thanks, Mark



More information about the NumPy-Discussion mailing list