/    /  NumPy – Import Module

NumPy – Import Module:

In this tutorial, we will learn how to import and use Numpy. You have to use the keyword “import” to import the numpy module.

Below is command to import the Numpy Module.

>>> import numpy

But, the better way of importing the Numpy is given below.

>>> import numpy as np

It is better to give an alias name and try using the same alias name for every call to numpy. Otherwise it will become write numpy.X file every time. By giving the alias name, it will use the np.X instead of using numpy.X.

There is another method of importing entire Numpy in a single call.

>>> from numpy import *

Anyhow this is not much preferred everytime.