Numpy is a general-purpose array-processing package. It provides a high-performance multidimensional array object, and tools for working with these arrays. It is the fundamental package for scientific computing with Python.
Besides its obvious scientific uses, Numpy can also be used as an efficient multi-dimensional container of generic data.
Install Numpy package :
-Goto search icon in your computer system.
-Search 'cmd'
- write the following command
pip install numpy
Import The numpy module in Program:
-to import the numpy in our program, we write the following lines in your program
import numpy
or
import numpy as np
or
from numpy import *
How call method in all three above:
import numpy
numpy.method()
import numpy as np
np.method()
from numpy import *
method()
Array In numpy:
-Array is collection of element of same type in other programming language like c, c++, but in python array can contains elements of different data type too.
-Array in python or numpy are similar as list in python.
-But using of Numpy Array is efficient way instead of using list.