Skip to content
Justice Tech School

NumPy Get Started

Install with pip install numpy, then import numpy as np. The np alias is a universal convention. Check the version with np.__version__.

Example
import numpy as np
import sys
print(sys.version_info.major)
x = np.arange(5)
print(x)

Result

3
[0 1 2 3 4]

Exercise

Install command.

pip  numpy

Quiz Test

Which alias is the convention?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.