Learning Objectives
- What is NumPy?
- Why NumPy?
- Importing NumPy
What is NumPy?
- NumPy stands for Numerical Python.
- It is an open-source Python library.
Why NumPy?
- Makes the numerical computations easier and faster
- Consumes less memory
Import NumPy
Anytime you want to use a library in Python, your first priority should be to make it accessible.
You can import/load NumPy in your notebook or any other Python IDE in two different ways.
1
import numpy
OR
1
import numpy as np
We will be using np shorthand for numpy. It simply serves as an alias and it is easier to use np instead writing full form ‘numpy’ while coding.
Note: In this course, we will use
1
import numpy as np