summaryrefslogtreecommitdiff
path: root/numpy/ma/tests
diff options
context:
space:
mode:
authorpierregm <pierregm@localhost>2009-04-11 22:33:27 +0000
committerpierregm <pierregm@localhost>2009-04-11 22:33:27 +0000
commitae58b00fee1839ba7e21ddfd7ebbf87f732caeb5 (patch)
treeacca2f4c8b9cce253ac2afeb385976663c7838ad /numpy/ma/tests
parent5e0e9559b9ec679b6902129bef46c84707abf865 (diff)
downloadnumpy-ae58b00fee1839ba7e21ddfd7ebbf87f732caeb5.tar.gz
_arraymethod : fallback when a method is called as MaskedArray.method
Diffstat (limited to 'numpy/ma/tests')
-rw-r--r--numpy/ma/tests/test_core.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
index 1e127abff..3ac4fce9e 100644
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -2272,6 +2272,18 @@ class TestMaskedArrayMethods(TestCase):
assert_equal(test, a)
assert_equal(test.data, a.data)
+
+ def test_arraymethod(self):
+ "Test a _arraymethod w/ n argument"
+ marray = masked_array([[1, 2, 3, 4, 5]], mask=[0, 0, 1, 0, 0])
+ control = masked_array([[1], [2], [3], [4], [5]],
+ mask=[0, 0, 1, 0, 0])
+ assert_equal(marray.T, control)
+ assert_equal(marray.transpose(), control)
+ #
+ assert_equal(MaskedArray.cumsum(marray.T, 0), control.cumsum(0))
+
+
#------------------------------------------------------------------------------