Previous Page
Next Page

16.2. Extensions for Numeric Array Computation

From http://sourceforge.net/project/showfiles.php?group_id=1369, you can freely download any of three extension packages that are compatible with each other: Numeric, Numarray, and NumPy. Each is available either as source code (easy to build and install on many platforms) or as a pre-built self-installing .exe file for Windows; some are also available in other pre-built forms, such as .rpm files for Linux or .dmg files for Apple Mac OS X. From the same URL, you can also download an extensive tutorial on Numeric and find links to other resources, such as bug trackers, mailing lists, and the Python Scientific Computing home page (http://numeric.scipy.org/).

Each of these extensions focuses on processing large arrays of numbers, which are often multidimensional (such as matrices). High-performance support for advanced computations such as linear algebra, Fast Fourier Transforms, and image processing, is supplied by many auxiliary modules, some of which come with the extension itself, while others can be downloaded separately from other sites. Each of the extensions is a large, rich package. For a fuller understanding, study the tutorial, work through the examples, and experiment interactively. This chapter presents a reference to an essential subset of Numeric on the assumption that you already have some grasp of array manipulation and numeric computing issues. If you are unfamiliar with this subject, the Numeric tutorial can help.

Numeric is not under active development anymore; it is widely considered "stable" by its users and "old" by its detractors. numarray is newer and richer, still under active development, and well documented and supported at its home site, http://www.stsci.edu/resources/software_hardware/numarray, where you will also find pointers to abundant, excellent documentation. NumPy is newest, richest, and under very active development (not quite up to a stable 1.0 release at the time of this writing); in the future, as it matures, you can confidently expect that NumPy will supersede both other extensions and become the dominant Python extension for numeric array computation. At the time of this writing, NumPy's documentation, to which http://numeric.scipy.org/ links, costs a fee, and the proceeds support NumPy's development, present and future. Eventually (when at least 5,000 copies have been sold, or no later than the year 2010 in any case), the documentation is expected to become free.

In this book, I choose to cover Numeric, which is stable, well-performing, and very useful for many applications. Learning about Numeric is also useful to grasp the other alternative packages, given the high degree of mutual compatibility. For a wide range of packages that support numeric and scientific computation in Python, see http://scipy.org. The Enthought distribution of Python, mentioned in "Installing Python from Binaries" on page 18, comes with a wide selection of such packages.


Previous Page
Next Page