5.1. Importing NumPy#

As for Matplotlib, NumPy must be imported before using it. It is very common to import NumPy using the np alias:

import numpy as np

So that every NumPy function is available under the np namespace:

np.mean([1, 2, 3])
2.0