diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2008-01-23 22:13:10 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2008-01-23 22:13:10 +0000 |
commit | e71a28f3c36b3a2be86d9d6ed472b4d27e63bf8c (patch) | |
tree | 77ad712c7517ca5f8df40263f510d1a7496c4775 /numpy/ma/tests | |
parent | 1447cc9d29e98ea7debf88a8442f6a7fa0835103 (diff) | |
download | numpy-e71a28f3c36b3a2be86d9d6ed472b4d27e63bf8c.tar.gz |
Add 'compress'.
Diffstat (limited to 'numpy/ma/tests')
-rw-r--r-- | numpy/ma/tests/test_core.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index 2dc758513..9b4f19284 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -1388,6 +1388,12 @@ class TestArrayMethods(NumpyTestCase): putmask(mxx, mask, values) assert_equal(mxx, [1,2,30,4,5,60]) + def test_compress(self): + a = array([1,2,3],mask=[True,False,False]) + b = compress(a,a<3) + assert_equal(b,[1,2]) + assert_equal(b.mask,[True,False]) + #.............................................................................. |