Skip main navigation

What is NumPy?

NumPy is the universal standard for working with numerical data in Python and it’s at the core of the scientific Python ecosystem.

NumPy (Numerical Python) is an open-source Python library. It is the universal standard for working with numerical data in Python and it’s at the core of the scientific Python ecosystem.

NumPy = Numerical + Python

Etymologically, NumPy is a portmanteau from ‘Numerical’ and ‘Python’. Numerical Python contains functions that can be used for all kinds of numerical operations in the data analysis process using Python.

The NumPy application programming interface (API) is extensively used in Pandas, SciPy, Matplotlib, scikit-learn, and most other data science and data analytics Python packages. With respect to Python, you can consider APIs as the core functions, classes, and modules defined in the NumPy package.

NumPy functionalities

There are many NumPy functionalities that include:

  • multi-dimensional Array and matrix data structures
  • a n-dimensional Array object of homogenous data type – ndArray – and methods to operate on it faster and more efficiently
  • standard mathematical functions for faster operations on the entire Array of data without the need for loops
  • linear algebra capabilities, random number generators, and so on.

While NumPy itself doesn’t provide high-level data analysis functionality, having the understanding of NumPy Arrays and its usage will help you in using other tools, like Pandas and Matplotlib, effectively and efficiently.

As in Python, to use a module in your NumPy program you first need to import it.

Importing NumPy

Any time you want to use a library or a package in your code, you first need to make it accessible by using the import statement. To start using NumPy and all of the functions available, this means importing the package. This can be easily done using the following code:

Importing NumPy package

import numpy as np

There is an unstated, undocumented convention that is followed in the Python world – using ‘np’ as the reference name while importing NumPy. Technically, any other name can be used, but this is the convention generally followed.

Which one?

Which functionality of NumPy do you think will be the most useful for conducting data analysis in your field?
This article is from the free online

Python Packages: NumPy and Pandas Dataframe

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education