STScI Logo
STScI Logo
HST
Banner

Features of numarray

Numarray is a reimplementation of the Numeric module that provides Python with capabilities similar to Matlab, IDL, or Octave. It improves on Numeric by:

  • Supporting access to byteswapped, misaligned, discontiguous, or type-mismatched arrays without requiring a complete temporary copy.
  • Modifying the type coercion rules to avoid unexpected type inflation (eg., 2.0 × <Float32 array> should not result in a Float64 array).
  • Implementing arrays as a family of classes rather than as an abstract C-type. Numarray provides python classes for handling numbers, fixed-length-strings, and records.
  • Supporting access to fields of arrays of records as numeric arrays without copying the data to a new array.
  • Supporting memory mapping of arrays.
  • Generating most C-extension code using python scripts.
  • Implementing its most complex functionality in Python.

Numarray to-do list:

  • Package ports. Numarray currently provides ports only for RandomArray, LinearAlgebra, Mlab, and FFT.
  • Support for extended precision types: Float128 and Complex128 are not yet supported.
  • Numeric compatability.

Copyright  | Help  | Printable Page