NumPy

PG()
Bartosz Roguski
Machine Learning Engineer
July 2, 2025
Glossary Category

NumPy is the foundational Python library that provides fast, memory-efficient n-dimensional arrays and a rich suite of mathematical functions for scientific computing. Its core object, numpy.ndarray, stores homogeneous data in contiguous C memory, enabling vectorized operations that run up to 100× faster than pure-Python loops. Key features include broadcasting, boolean masking, linear algebra via numpy.linalg, random number generation, and interoperability with C, C++, and Fortran through the array interface. NumPy underpins most of the PyData stack—Pandas, SciPy, scikit-learn, and deep-learning frameworks like PyTorch and TensorFlow—by serving as their low-level tensor substrate. Released in 2006 as a merger of Numeric and numarray, the library is governed by a vibrant open-source community and optimized continuously for SIMD, BLAS, and GPU back ends. Mastering NumPy’s slicing, ufuncs, and broadcasting semantics is the first step to writing high-performance data and AI pipelines in Python