[Numpy-discussion] (no subject)

Brett Olsen brett.olsen at gmail.com
Mon Feb 6 15:10:29 EST 2012


The namespace is different.  If you want to use numpy.sin(), for
example, you would use:

import numpy as np
np.sin(angle)

or

from numpy import *
sin(angle)

I generally prefer the first option because then I don't need to worry
about multiple imports writing on top of each other (i.e., having test
functions in several modules, and then accidentally using the wrong
one).

~Brett

On Mon, Feb 6, 2012 at 1:21 PM, Debashish Saha <silideba at gmail.com> wrote:
> basic difference between the commands:
> import numpy as np
> from numpy import *
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list