NumPy
NumPy – Numerical Python
The fundamental library for multidimensional arrays and numerical computing in Python, on which most data science and AI libraries are built.
Basic information
| Name | NumPy |
|---|---|
| Full name | NumPy – Numerical Python |
| Category | Scientific Computing & Data Processing Libraries |
| Developer | The NumPy community (sponsored by NumFOCUS) |
| Release year | 2006 |
| Official website | numpy.org |
| GitHub repository | numpy/numpy |
| Official documentation | numpy.org/doc |
| Package on PyPI | numpy |
| License | BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0 (PyPI license_expression) |
| Project status | Active Had a release in the last 12 months |
| Latest version | 15 November 2026 (version 2.5.5) |
| Programming language | Python, C |
| Operating systems | MacOS, POSIX, Unix, Windows (as declared by the package on PyPI) |
| Required Python version | >=3.12 |
| Difficulty level | Beginner |
Data last checked: 21 November 2026 — source: PyPI JSON API (2026-11-21)
Overview
NumPy provides the multidimensional ndarray type with vectorized operations written in C, so computations run over millions of elements without slow Python loops. It includes linear algebra, transforms, random numbers, and broadcasting between arrays of different shapes.
The NumPy API has become a de facto standard: Pandas, SciPy, scikit-learn and OpenCV follow its data representation, and CuPy and JAX mimic its API on GPUs. That makes understanding it a first step before any deep learning framework.
When to choose it? Choose it for any numerical computation or data representation on the CPU; move to CuPy or JAX when you need a GPU.
Uses
Main uses
- Representing data, images and signals as arrays
- Vectorized operations and linear algebra
- Generating random numbers for experiments
- Preparing data before feeding it to machine learning models
Scientific fields
- Data science
- Scientific computing
- Signal and image processing
Suitable project types
- Analysing experimental data
- Implementing machine learning algorithms from scratch for teaching
- Preprocessing images and signals
Research applications
- Implementing mathematical models and reproducible simulation experiments
- Analysing experiment results and computing statistical measures
Technical features
A feature is shown as "Supported" only if it is documented in the library's official documentation; anything we have not verified is shown as "Not specified".
| CPU support | Supported |
|---|---|
| GPU support | Not supportedIt does not run on the GPU directly; CuPy and JAX offer a similar API on GPUs. |
| CUDA compatibility | Not supported |
| Distributed training or computing | Not supported |
| Automatic differentiation (Autodiff) | Not supported |
| Model deployment | Not applicable |
| Pre-trained models | Not applicable |
| Supported data types | Integers and floats of various precisions, complex numbers, booleans, strings, structured types |
| Integration with other libraries | Pandas, SciPy, Matplotlib, Scikit-learn, PyTorch, OpenCV |
| Flexibility (editorial estimate) | High for general computation |
| Performance (editorial estimate) | Fast on the CPU thanks to its C implementation |
| Community (editorial estimate) | One of the largest scientific Python communities |
| Documentation quality (editorial estimate) | Comprehensive official documentation with tutorials |
Installation and running
pip install numpyCompatibility: Python >=3.12 — according to the package data on PyPI, checked on 21 November 2026
Installing inside a virtual environment (venv or conda) is recommended. If you need compatibility with a specific CUDA version or operating system, refer to the official documentation, because this information changes with every release.
Code examples
Examples marked "Run and tested" were actually run, with their output, test date and library versions recorded; the others need a GPU or model downloads, so they were not run in the test environment.
BeginnerVectorized operations and statistics on an arrayRun and tested
Goal: Computing the mean and standard deviation and normalising columns without Python loops.
import numpy as np
rng = np.random.default_rng(42)
X = rng.normal(loc=[10, 50, 100], scale=[1, 5, 20], size=(5, 3))
mean = X.mean(axis=0)
std = X.std(axis=0)
Z = (X - mean) / std # broadcasting: (5,3) - (3,)
print("Shape:", X.shape)
print("Means:", np.round(mean, 2))
print("After standardisation, each column's mean ≈ 0:", np.round(Z.mean(axis=0), 6))
print("and its standard deviation = 1:", np.round(Z.std(axis=0), 6))
Code explanation
We create a random array with a fixed-seed generator so the result is reproducible, then compute each column's statistics with axis=0, and normalise the data (Z-score) in a single operation thanks to broadcasting between a 5×3 array and a vector of length 3.
Output recorded during testing
Shape: (5, 3) Means: [ 10.12 48.7 102.71] After standardisation, each column's mean ≈ 0: [-0. -0. -0.] and its standard deviation = 1: [1. 1. 1.]
This example was actually run and tested on 21 November 2026 on a CPU — numpy 2.5.5, python 3.13.18
Pros
- High performance for vectorized operations
- A stable, well-documented API and a standard for other libraries
- A huge community and countless examples
Limitations
- No GPU support and no automatic differentiation
- The array must fit in memory
References and verification
- Package page on PyPI (source of the version, licence and release date) Checked directly
https://pypi.org/project/numpy/
Checked on: 21 November 2026 — version checked: 2.5.5 — reviewed by: the DLArabic team
- Official website A link the package officially declares on PyPI
https://numpy.org
Checked on: 21 November 2026 — reviewed by: the DLArabic team
- Official documentation A link the package officially declares on PyPI
https://numpy.org/doc/
Checked on: 21 November 2026 — reviewed by: the DLArabic team
- Official repository A link the package officially declares on PyPI
https://github.com/numpy/numpy
Checked on: 21 November 2026 — reviewed by: the DLArabic team
History of verified versions
| Version | Release date | Checked on |
|---|---|---|
| 2.5.5 | 15 November 2026 | 21 November 2026 |
Page information last reviewed: 21 November 2026. The description was written originally for the encyclopedia and is not copied from the official websites.
