diff options
author | pierregm <pierregm@localhost> | 2009-08-06 16:38:54 +0000 |
---|---|---|
committer | pierregm <pierregm@localhost> | 2009-08-06 16:38:54 +0000 |
commit | d0bba527fa3ade5674c670b6df1d7ad0346603c1 (patch) | |
tree | b94659f8db46956e6f1a2b1fbec0a5f0fbee1a21 /numpy/ma/tests | |
parent | 99835f47c42535b20bddb670f09bb99f011eae7f (diff) | |
download | numpy-d0bba527fa3ade5674c670b6df1d7ad0346603c1.tar.gz |
* fixed _from_methods to run on ndarrays (bug #1187)
Diffstat (limited to 'numpy/ma/tests')
-rw-r--r-- | numpy/ma/tests/test_core.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index ee2af1110..dc37ff4b6 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -2339,7 +2339,7 @@ class TestMaskedArrayMethods(TestCase): #------------------------------------------------------------------------------ -class TestMaskArrayMathMethod(TestCase): +class TestMaskedArrayMathMethods(TestCase): def setUp(self): "Base data definition." @@ -2978,6 +2978,16 @@ class TestMaskedArrayFunctions(TestCase): control = np.array([ 0, 0, 0, 0, 0, 1], dtype=bool) assert_equal(test, control) + + def test_on_ndarray(self): + "Test functions on ndarrays" + a = np.array([1, 2, 3, 4]) + m = array(a, mask=False) + test = anom(a) + assert_equal(test, m.anom()) + test = reshape(a, (2, 2)) + assert_equal(test, m.reshape(2, 2)) + #------------------------------------------------------------------------------ class TestMaskedFields(TestCase): |