test_subclassing

Tests suite for MaskedArray & subclassing.

author:Pierre Gerard-Marchant
contact:pierregm_at_uga_dot_edu
version:$Id: test_subclassing.py 3473 2007-10-29 15:18:13Z jarrod.millman $

Module Contents

__author__ = Pierre GF Gerard-Marchant ($Author: jarrod.millman $)
__version__ = 1.0
__revision__ = $Revision: 3473 $
__date__ = $Date: 2007-10-29 17:18:13 +0200 (Mon, 29 Oct 2007) $
class SubArray

Bases:numpy.ma.core.np.ndarray

classmethod __new__(cls, arr, info={})
__array_finalize__(self, obj)
__add__(self, other)
subarray
class MSubArray

Bases:test_subclassing.SubArray, numpy.ma.core.MaskedArray

_series
classmethod __new__(cls, data, info={}, mask=nomask)
__array_finalize__(self, obj)
_get_series(self)
msubarray
class MMatrix

Bases:numpy.ma.core.MaskedArray, numpy.ma.core.np.matrix

_series
classmethod __new__(cls, data, mask=nomask)
__array_finalize__(self, obj)
_get_series(self)
mmatrix
class ComplicatedSubArray

Bases:test_subclassing.SubArray

__str__(self)
__repr__(self)
__setitem__(self, item, value)
class TestSubclassing

Bases:TestCase

setUp(self)
test_data_subclassing(self)
test_maskedarray_subclassing(self)
test_masked_unary_operations(self)
test_masked_binary_operations(self)
test_masked_binary_operations2(self)
test_attributepropagation(self)
test_subclasspreservation(self)
test_subclass_repr(self)

test that repr uses the name of the subclass and ‘array’ for np.ndarray

test_subclass_str(self)

test str with subclass that has overridden str, setitem