NumPy Tutorial
NumPy (Numerical Python) is an extension library for Python, supporting large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.
The predecessor of NumPy, Numeric, was originally developed by Jim Hugunin and other collaborators. In 2005, Travis Oliphant created NumPy by incorporating features from another library, Numarray, into Numeric and adding further extensions. NumPy is open-source and is maintained and developed by many contributors.
NumPy is a fast and powerful mathematical library primarily used for array computations, including:
- A powerful N-dimensional array object
- Functions for broadcasting
- Tools for integrating C/C++/Fortran code
- Capabilities for linear algebra, Fourier transform, and random number generation
Prerequisites
Before starting this NumPy tutorial, you should have a basic understanding of Python. If you are not familiar with Python, you can read our tutorials:
Applications of NumPy
NumPy is commonly used along with SciPy (Scientific Python) and Matplotlib (plotting library), which together serve as a powerful scientific computing environment, often used as a replacement for MatLab. This combination is beneficial for learning data science or machine learning through Python.
SciPy is an open-source Python library used for solving scientific and mathematical problems.
SciPy includes modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers, and other tasks common in science and engineering.
Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension, NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like 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 Website: https://matplotlib.org/
- Matplotlib Source Code: https://github.com/matplotlib/matplotlib