API Reference for Enthought Tool Suite 3.0.1

Define a UnitArray that subclasses from a Numpy array

This class simply adds a "units" object to a numpy array. It deals with unit adjustments involving basic arithmetic and comparison operations between arrays with units. If incompatible units are used, an error will be raised.

Note that the "units" may hold some amount of the magnitude, which can be particularly significant for dimensionless quantities.

You should always convert a UnitArray to the required units before extracting the numerical value.

This code is shamelessly copied from the numpy matrix class. It is of course modified to suite our purposes.

Method summary

Methods

© Copyright 2002-2008 Enthought, Inc.