NumPy

NumPy fundational instrument for data analysis in Python, which powers all other instruments and and has following features:

  • a powerful N-dimensional array object
  • broadcasting functions
  • tools for integrating C/C++ and Fortran code
  • useful linear algebra, Fourier transform, and random number capabilities

NumPy targets the CPython reference implementation of Python, which is a non-optimizing bytecode interpreter. Mathematical algorithms written for this version of Python often run much slower than compiled equivalents. NumPy addresses the slowness problem partly by providing multidimensional arrays and functions and operators that operate efficiently on arrays, requiring rewriting some code, mostly inner loops using NumPy.

The core functionality of NumPy is its “ndarray”, for n-dimensional array, data structure. These arrays are strided views on memory. In contrast to Python’s built-in list data structure (which, despite the name, is a dynamic array), these arrays are homogeneously typed: all elements of a single array must be of the same type.riting some code, mostly inner loops using NumPy.