Numerical Python
From Wikipedia, the free encyclopedia
Numerical Python (often abbreviated NumPy although technically NumPy refers uniquely to the latest edition of Numerical Python) is an extension to the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large library of high-level mathematical functions to operate on these arrays. Numerical Python was originally created by Jim Hugunin but it is open source and has many contributors.
There are actually three different implementations of Numerical Python. The original one, Numeric, which is reasonably complete and stable, remains available, but is now obsolete. A newer implementation, Numarray, is a complete rewrite of Numerical Python. The most recent, NumPy, is a merge between the two that builds on the code base of Numeric and adds the features of Numarray. The rest of this discussion applies to all three.
Because Python is an interpreted language, mathematical algorithms often run much slower than they do in compiled languages like C or even Java. Numerical Python addresses this problem for many numerical algorithms by providing multidimensional arrays and lots of functions and operators that operate on arrays. Thus any algorithm that can be expressed primarily as operations on arrays and matrices can run almost as fast as the equivalent C code.
Some see Numerical Python as a good free alternative to MATLAB, since MATLAB's programming language is similar in some superficial ways to Numerical Python: they are both interpreted, and they both allow the user to write fast programs as long as most operations work on arrays or matrices instead of scalars. MATLAB has the mathematical advantage in that it has many thousands of built-in mathematical functions and many more available as commercial products, while Numerical Python has the advantage that Python is a more modern and complete programming language, and it is also open source. SciPy is a library that adds more MATLAB-like functionality; Matplotlib is a plotting package that provides MATLAB-like plotting functionality