Instagram
youtube
Facebook
Twitter

Numpy Installation and Importing

Installation of Numpy

Numpy installation requires you to have python and pip both installed on your local machine. 

then the installation is very easy you just have to use this command in the command prompt if your machine is windows.

C:\Users\Your Name>pip install numpy

you can also use a Python distribution like Anaconda, and Spyder which already has NumPy installed.


Importing Numpy

Now that we have installed the Numpy in our system it's time to use the Numpy in python code for manipulation and data insights using the import keyword at the top of your code lines.

import numpy as np

for instance, 

import numpy as np

arr = np.array([9,2,4,6,1,0])
print(arr)

We recommend always using a stable version of NumPy and to check the version we use the __version__ attribute

import numpy as np

print(np.__version__) # prints out the version u you are using