Pre-NumPy fragmentation
In the early 2000s numerical computing in Python was fragmented: Numeric (1995, Jim Hugunin) and numarray (2001, STScI) were two array libraries with divergent APIs; the scientific community was split.
Travis Oliphant (then at Brigham Young University, later co-founder of Enthought and Continuum Analytics / Anaconda) unifies the two in 2005-2006 as NumPy. Version 1.0 is released on 25 October 2006. BSD 3-Clause licence.
ndarray
NumPy’s core is ndarray — homogeneous n-dimensional array:
- Fixed data type (float32, int64, etc.) — more efficient than Python lists
- Multi-dimensional shape — 2D matrices, 3D+ tensors
- Broadcasting — operations between compatible-shaped arrays
- Vectorised operations — element-wise operations without Python for loops
import numpy as np
a = np.array([[1, 2], [3, 4]])
b = np.array([10, 20])
print(a + b) # broadcasting: [[11,22],[13,24]]
print(a @ b) # matrix multiply: [50, 110]
print(np.linalg.inv(a)) # matrix inverse
Operators are implemented in C + BLAS/LAPACK, 10-100x faster than equivalent Python loops.
The scientific ecosystem
NumPy becomes the base:
- SciPy (Eric Jones, Travis Oliphant, Pearu Peterson, 2001+) — advanced numerical algorithms
- matplotlib (John Hunter, 2003) — visualisation
- pandas (Wes McKinney, 2008) — tabular dataframes
- scikit-learn (David Cournapeau, 2007) — machine learning
- scikit-image — image processing
- statsmodels — advanced statistics
- SymPy — symbolic
- PyTorch, TensorFlow — deep learning frameworks use NumPy for interoperability
Without NumPy, Python would not be the dominant language of data science.
The 2020 Nature article
In September 2020 the journal Nature publishes “Array programming with NumPy” (Harris, Millman, van der Walt et al.) — rare top-tier academic coverage for an open source project. Recognises NumPy as critical scientific infrastructure.
Funding
NumPy was for years maintained without structured funding by volunteers and Travis Oliphant. From 2017 NumFOCUS (non-profit body) collects donations and sponsorships; CZI (Chan Zuckerberg Initiative) has directly funded NumPy developers from 2020.
In the Italian context
NumPy is in every Italian scientific research lab, every data team, every AI/ML project. Absolute ubiquity.
References: NumPy 1.0 (25 October 2006). Travis Oliphant. Unification of Numeric (1995) and numarray (2001). BSD 3-Clause licence. BLAS/LAPACK backend. NumFOCUS. Paper Harris et al., Nature 585, 357-362 (2020).
