NumPy Getting Started
Installation of NumPy
Install it using this command:
If this command fails, then use a python distribution that already has NumPy installed like, Anaconda, Spyder etc.
Once NumPy is installed, import it in your applications by adding the
Now Numpy is imported and ready to use.
arr = numpy.array([1, 2, 3, 4, 5])
NumPy as np
NumPy is usually imported under the
alias: In Python alias are an alternate name for referring to the same thing.
Create an alias with the
as keyword while importing:
Now the NumPy package can be referred to as
np instead of
arr = np.array([1, 2, 3, 4, 5])
Checking NumPy Version
The version string is stored under