NumPy
The foundational Python library for fast numerical arrays and vectorized math.
- ndarray + huge C-level operation library.
- Substrate under pandas, sklearn, SciPy, PyTorch.
- NumPy 2.0 (2024) modernized dtypes and public API.
When to use: Any numerical computation; every preprocessing or metric step.
Example: a = np.arange(1_000_000); a.sum() runs in ~1 ms vs ~50 ms for sum(range(1M)).