Member-only story

NumPy Tutorial: How to Get Started With NumPy

Jesse L
3 min readOct 3, 2021

--

Hi everyone, welcome back. NumPy is a library for the Python programming language. NumPy is short for “Numerical Python” and is a popular library that is used in data science. NumPy is used specifically to work with arrays as it provides various functions and support. We will go over how to get started with NumPy and some of the basic array functionalities.

Installation

In order to work with NumPy, we will need to have Python and PIP installed. Python can be downloaded and installed here. PIP can be downloaded an installed here. With both Python and PIP installed, we can then install NumPy using pip through the command line. Open up a command prompt or a terminal and enter:

pip install numpy

NumPy can also be used in Python distributions such as Anaconda and Spyder.

Importing

Now we want to import NumPy into our project to use. We can do this the same way we handle other imports by adding this line in our Python file:

import numpy

Often times, libraries are imported under an alias, or an alternate name. For example:

import numpy as np

Throughout the rest of this tutorial, I will be referring to NumPy as np.

--

--

Jesse L
Jesse L

Written by Jesse L

Hi, I'm a passionate technology enthusiast and lifelong learner. Beyond my technical pursuits, I'm also passionate about sharing my enthusiasm with others.

No responses yet