Version 9 Version 9.0 Changed to use PropertiedClasses. Added assignment behavior for x.flat = value, x.real = value, x.imag = value. Forbid deletion of these attributes. Fixed bug in where, when one or more arguments is the value masked. compress now requires condition to have no masked values, but the result can have masked values. __array__ accepts a typecode, and fails if any values are masked by throwing an MAError. make_mask_none and create_mask were redundant, so the latter was removed and reincarnated as an alias. new method 'unmask()' changes the mask to None if possible. add ceil; evidently forgotten on original build or got lost. add fromstring, fromfunction, diagonal add operators %, ^, &, | Reimplemented minimum and maximum to add reduce, outer attributes. minimum and maximum of two scalars returns a scalar. Added outer attribute to masked_binary_function class. Added new test suite which shadows the Numeric one; uses PyUnit Version 8 Version 8.9 Fix where to handle scalars ok. Fixed where to handle masked as an argument again. Fix maximum and minimum to return scalar if scalar args. Version 8.8 Fixed bug in flat that did not flatten the mask. Version 8.7 Fixed bug in setitem for type object by fixing filled if argument is a string. Versions 8.0-8.6: Add option returned=0 to average. If given, return is a tuple, the requested result and the corresponding sum of the weights or counts. Fix sort for multiple dimensions. Solution has consequences for masked data that has the fill value at a non-masked site. Please study documentation. Removed copy= option from the function filled (method filled never had it) This allows the implementation to be much more efficient and the functionality is not really necessary. Added a copy argument to masked_where, masked_equal, etc. Reimplemented choose to allow a fully general analog to Numeric.choose but masked may be given in the tuple list and will result in masked elements. Reimplemented where. where now masks only those locations that are masked in the condition or masked in the particular element chosen. If no masked elements are chosen by the condition the resultants mask is None. masked_inside(x, v1, v2, copy=1) and masked_outside(x, v1, v2, copy=1) return x with a mask. For masked_inside, the mask is on all values in [v1,v2]. For masked_outside, it is on all values outside that interval. v1 and v2 can be given in either order. Implementation of in-place arithmetic revised. Differs from Numeric semantics in being more generous about converting the rhs to the required type: any kind or lesser type accepted via an astype conversion. Operates in place when target is not masked. Fixed bug in indexing; was returning a zero-length array in some cases instead of raising an Index error. Added methods itemsize, tostring, tolist. Fixed bug in count. Masks have the spavespace attribute so don't count by them. Added count method. Version 7.0 Fix bug in setting shape for non-contiguous data. Added create_mask(shape) to make a mask from a shape. If the data argument to array is a MaskedArray, and mask is not given, data.mask() is used as mask. Tightened up the case of creation with copy=0; in particular, array(d, copy=0) uses d's raw_data() and mask() if d is a MaskedArray, and d as raw data if d is a Numeric array. Fixed bug in case of count with an axis but no mask; it was returning the correct count but as a scalar instead of properly shaped. Fixed bug so that resize contains a mask. Added repeat. Fixed allclose so that it works if an argument is an integer array with the spacesaver flag set. Change test is masked_values(d,v) to abs(d-v)<=atol + rtol * abs(v) This makes the limit as atol and rtol -> 0 correct, and makes the interpretation on rtol as a percent of v. Similar change to allclose for consistency. Version 6.0 Inheritance and redefine an active attribute would not work right. Moved back to a per-instance jump table. Version 5.0 Changed class name to MaskedArray from MA. Added isMaskedArray, but left isMA as an alias. I was seeing too many errors from mixing import MA and from MA import * with resulting confused error messages. Version 4.2 Fixed bug in maximum and minimum for >1 dimension and no mask caused by deficiency in max and min. Fixed bug in count when no axis given, no mask, >1 d. Changed format of timing printout in the test routine. Added methods dot and outer to array class.