NumPy
by NumPy developers (NumFOCUS) · Library
Foundational Python library for n-dimensional arrays, vectorized math, linear algebra, random numbers and the array API used by the scientific stack
Overview
NumPy is the array library at the base of scientific Python, maintained by an open community under NumFOCUS and released under the BSD 3-Clause license. Its ndarray stores homogeneous n-dimensional data in contiguous memory with a dtype and strides, and universal functions apply elementwise operations, broadcasting and reductions in compiled C loops. Submodules provide linear algebra (backed by BLAS and LAPACK), FFTs, polynomial fitting and a modern random-number Generator API. NumPy 2.x cleaned up the public namespace, adopted the Python array API standard and added variable-length string dtypes.
Almost every numerical package in Python, including pandas, SciPy, scikit-learn, statsmodels, matplotlib and the deep-learning frameworks, consumes or produces NumPy arrays or implements its protocols. On Apple Silicon the wheels link against Accelerate or OpenBLAS. NumPy runs on a single CPU and holds arrays in memory; GPU acceleration, autodiff and distributed arrays belong to JAX, PyTorch, MLX, Dask or CuPy, which deliberately mirror its API.
Capabilities
- n-dimensional ndarray with dtypes, strides and views
- Broadcasting and vectorized universal functions
- Linear algebra, FFT and polynomial modules
- Random Generator API with multiple bit generators
- Array API standard compliance and interoperability protocols
- C API for extension modules
Typical workflows
- Numerical computation underneath pandas, SciPy and scikit-learn
- Matrix algebra for econometric estimators
- Preprocessing arrays before handing them to PyTorch, JAX or MLX
Strengths
- Universal interchange format for numerical Python
- Compiled performance for vectorized operations
- Stable, well-documented API and BSD license
Limitations
- CPU-only and single-process
- Arrays must fit in memory
- Loops in Python remain slow; vectorization required
Prerequisites
- Python 3
Who it is for
- Scientists and engineers
- Students
- Library developers
Alternatives & comparison
- JAX
Python library for NumPy-style array computing with composable transformations (jit, grad, vmap, shard_map) compiled through XLA to CPU, GPU and TPU
Open sourceOpen source - MLX
Apple's open-source array framework for machine learning on Apple Silicon, with NumPy-like Python, C++ and Swift APIs and unified CPU/GPU memory
Open sourceOpen source - pandas
The standard Python DataFrame library for labeled tabular data, time series and I/O to CSV, Excel, SQL, Parquet and more
Open sourceOpen source - Polars
Rust-based DataFrame library with Python, Rust, Node and R bindings offering lazy query optimization, multithreading and Arrow-native memory
Open sourceOpen source - PyTorch
Open-source deep-learning framework with eager tensors, autograd, torch.compile and distributed training, governed by the PyTorch Foundation and the base of most LLM tooling
Open sourceOpen source - QuantLib
Open-source C++ library for quantitative finance covering instruments, term structures, pricing engines and calendars, with Python and other bindings
Open sourceOpen source - SciPy
Core open-source Python library for scientific computing on NumPy arrays: optimization, integration, interpolation, linear algebra, sparse matrices, statistics, signal processing
Open sourceFree
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- LicenseNumPy LICENSE.txt (BSD 3-Clause)checked Nov 1, 2026
https://github.com/numpy/numpy/blob/main/LICENSE.txt
Supports: license_spdx, source_model
- Official documentationchecked Nov 1, 2026
- Official sitechecked Nov 1, 2026
- Repositorychecked Nov 1, 2026
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Broken · Nov 2, 2026
Spotted an error?
More in DataFrames & array computing
Apache Arrow
Apache Software Foundation · Data catalogs & formats
Language-independent columnar in-memory format and libraries that let DuckDB, Polars, pandas, Spark and databases exchange tables without copying
GeoPandas
GeoPandas developers (NumFOCUS affiliated) · GIS & mapping
Python library extending pandas with geometry columns, spatial operations, reprojection, spatial joins and file I/O for vector geodata
Apache DataFusion
Apache Software Foundation · Analytical engines & OLAP
Extensible Rust query engine built on Apache Arrow offering SQL and DataFrame APIs, Parquet readers and an optimizer for embedding in data systems
Dask
Dask developers (open-source community) · Distributed & parallel computing
Python library for parallel and distributed computing that scales pandas, NumPy and custom task graphs from a laptop to a cluster