Skip to content
Last Dictionary

NumPy

proper noun/NUM-pie/Also: Numerical Python, ndarray

In plain wordsThe basic free Python library for working quickly with large grids of numbers; nearly every data-science and machine-learning tool in Python is built on it or copies its style.

  1. An open-source Python library on which most numerical computing in that language rests. Its core is the ndarray, an n-dimensional array whose elements share one data type and sit in a single memory buffer, manipulated by vectorized operations compiled in C: elementwise arithmetic, broadcasting between arrays of different shapes, indexing and slicing and reductions, with submodules for linear algebra, Fourier transforms and random numbers. Expressing computations as whole-array operations instead of Python loops gives large speedups and a concise mathematical style. NumPy's array model underlies scientific Python — SciPy, pandas, scikit-learnscikit-learn, prop. n.: A free, widely taught Python library of classic machine-learning methods — such as decision trees, regression and clustering — that all work in the same simple way., Matplotlib — and deep-learning libraries imitate it: PyTorchPyTorch, prop. n.: The most widely used free software toolkit for building and training neural networks, especially in research; programmers write ordinary Python and it handles the calculus and the graphics chips. tensors, JAXJAX, prop. n.: A free Google library that lets researchers write mathematics in familiar Python and automatically get derivatives and very fast code for graphics chips and Google's AI chips.'s jax.numpy and the GPU library CuPy follow its indexing and broadcasting conventions, and the Python array API standard formalizes their shared core. NumPy itself runs on CPUs only and has no automatic differentiationautomatic differentiation, n.: A technique that lets a computer work out exactly how a program's output would change if its inputs changed slightly, by tracking every arithmetic step. It lets AI software compute training updates automatically., which is what deep-learning frameworks add.

    Convert the predictions to a NumPy array and compute the confusion matrix with one vectorized call.

Origin

Created by Travis Oliphant in 2005–2006 by unifying two earlier array packages, Numeric (1995, begun by Jim Hugunin) and Numarray; version 1.0 appeared in 2006. A 2020 Nature paper by Charles Harris and colleagues described its design and its role in projects such as the first image of a black hole and the detection of gravitational waves.

Related

See also
  • scikit-learnscikit-learn, prop. n.: A free, widely taught Python library of classic machine-learning methods — such as decision trees, regression and clustering — that all work in the same simple way.
  • JAXJAX, prop. n.: A free Google library that lets researchers write mathematics in familiar Python and automatically get derivatives and very fast code for graphics chips and Google's AI chips.
  • PyTorchPyTorch, prop. n.: The most widely used free software toolkit for building and training neural networks, especially in research; programmers write ordinary Python and it handles the calculus and the graphics chips.
  • tensortensor, n.: A block of numbers with any number of dimensions: a single number, a list, a grid, or a stack of grids. AI software stores and processes all its data this way.
  • Jupyter notebookJupyter notebook, n.: An interactive document, opened in a web browser, that mixes runnable code with its results, charts and notes, so people can experiment step by step and share their work.

Sources

  1. Harris, C. R. et al. (2020). Array programming with NumPy. Nature 585, 357–362.

Mentioned in

Jupyter notebookJupyter notebook, n.: An interactive document, opened in a web browser, that mixes runnable code with its results, charts and notes, so people can experiment step by step and share their work., pandaspandas, prop. n.: A free Python library for loading, cleaning, combining and summarizing tables of data, like a programmable spreadsheet; it is a standard first tool for preparing data for machine learning., scikit-learnscikit-learn, prop. n.: A free, widely taught Python library of classic machine-learning methods — such as decision trees, regression and clustering — that all work in the same simple way., JAXJAX, prop. n.: A free Google library that lets researchers write mathematics in familiar Python and automatically get derivatives and very fast code for graphics chips and Google's AI chips., MLXMLX, prop. n.: A free Apple software toolkit for running and training AI models efficiently on Mac computers with Apple's own chips, popular for running language models locally on a laptop.