NumPy Tutorial
NumPy (Numerical Python) is an extension library for the Python language that supports a large number of multidimensional array and matrix operations, and also provides a large library of mathematical functions for array operations.
NumPy's predecessor Numeric was first developed by Jim Hugunin and other collaborators. In 2005, Travis Oliphant combined features of another similar library, Numarray, into Numeric and added other extensions to develop NumPy. NumPy is open source and is maintained and developed by many collaborators.
NumPy is a very fast math library, mainly used for array computation, including:
- A powerful N-dimensional array object, ndarray
- Broadcasting functions
- Tools for integrating C/C++/Fortran code
- Functions for linear algebra, Fourier transforms, random number generation, and more
What you need to know before studying this tutorial
Before learning this NumPy tutorial, we need a basic foundation in Python. If you are not yet familiar with Python, you can read our tutorial:
NumPy Applications
NumPy is usually used together with SciPy (Scientific Python) and Matplotlib (plotting library). This combination is widely used as a replacement for MatLab and is a powerful scientific computing environment that helps us learn data science or machine learning through Python.
SciPy is an open-source Python algorithm library and mathematical toolkit.
The modules included in SciPy cover optimization, linear algebra, integration, interpolation, special functions, fast Fourier transform, signal and image processing, ordinary differential equation solving, and other computations commonly used in science and engineering.
Matplotlib is the visualization interface for the Python programming language and its numerical math extension package NumPy. It provides an application programming interface (API) for embedding plots into applications using general GUI toolkits such as Tkinter, wxPython, Qt, or GTK+.
Related links
- NumPy Official Website http://www.numpy.org/
- NumPy Source Code:https://github.com/numpy/numpy
- SciPy Official Website:https://www.scipy.org/
- SciPy Source Code:https://github.com/scipy/scipy
- Matplotlib tutorial:Matplotlib Tutorial
- Matplotlib Official Websitehttps://matplotlib.org/
- Matplotlib Source Code:https://github.com/matplotlib/matplotlib