Introduction to NumPy
Importing NumPy

To use NumPy with Python, import it at the top of your file using the following line:

import numpy as np

Writing as np allows us to use np as a shorthand for NumPy, which saves us time when calling a NumPy function (less typing = fewer errors!)



Import the NumPy package in script.py

Folder Icon

Sign up to start coding

Already have an account?