Introduction to NumPy and Matplotlib
Chapter 1: Introduction
Importing NumPy
To use NumPy:
import numpy as np
It is common to use np as a shorthand. We will assume that you have imported NumPy this way, and will use np in all the examples that will follow.
If you receive a ModuleNotFoundError, it means Python cannot find your NumPy installation.
If you have not yet installed NumPy, do it with pip install numpy.
Otherwise, check that you are using the correct version of Python or virtual environment.