NumPy

NumPy is the new generation of the widely used Numeric and numarray array modules for Python. It is fast developing towards a first stable release, and many developers - including the Numeric and numarray maintainers - are switching to NumPy as the standard array package.

The new NumPy used to be called scipy_core.

Here is a summary of new features of NumPy / scipy_core : http://numeric.scipy.org/new_features.html

Converting to NumPy

In practice, we will be transferring all our development work to use NumPy only, rather than Numeric or numarray. You can convert between the formats for each of these packages using the new ArrayProtocol.

You can convert code written for Numeric to numarray fairly simply. See the Sample chapters of the NumPy book, and look for the code to do the conversion in NumPy itself: /numpy/lib/convertcode.py

There is not yet the equivalent function to convert code written for numarray.

Perry Greenfield summarized the differences in an email:

(e.g. the changes in the types system, how rank-0

issues, the C-API, object array details and the names of the standard packages within scipy_core.)

Quick reference

Attached is an opendocument quick reference to common numpy array manipulation. Handy for getting more familiar with the numerous arrays manipulation functions, especially if new to numpy. It's basically the main docstrings printed on two pages.

Attachments