summaryrefslogtreecommitdiff
path: root/numpy/ma/tests/test_extras.py
diff options
context:
space:
mode:
authorpierregm <pierregm@localhost>2010-08-11 01:59:39 +0000
committerpierregm <pierregm@localhost>2010-08-11 01:59:39 +0000
commit6cfb3ff7d24f87257f067359fdf0957fad8f6718 (patch)
tree14b4e7e393fe830c6c55e00199e2267a4c3f119f /numpy/ma/tests/test_extras.py
parent1994e4ae0f9e98c419793c7d3e6a079aa0c23010 (diff)
downloadnumpy-6cfb3ff7d24f87257f067359fdf0957fad8f6718.tar.gz
fix (flat)notmasked_/contiguous/edges/
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r--numpy/ma/tests/test_extras.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py
index ce111cfb3..ac33ec0e5 100644
--- a/numpy/ma/tests/test_extras.py
+++ b/numpy/ma/tests/test_extras.py
@@ -101,7 +101,7 @@ class TestGeneric(TestCase):
#
a[:] = masked
test = flatnotmasked_contiguous(a)
- assert_equal(test, [])
+ assert_equal(test, None)
class TestAverage(TestCase):
@@ -251,7 +251,7 @@ class TestNotMasked(TestCase):
assert_equal(test[1], [(0, 1, 2, 3, 4), (4, 2, 4, 4, 4)])
#
test = notmasked_edges(data.data, None)
- assert_equal(test, [0, -1])
+ assert_equal(test, [0, 24])
test = notmasked_edges(data.data, 0)
assert_equal(test[0], [(0, 0, 0, 0, 0), (0, 1, 2, 3, 4)])
assert_equal(test[1], [(4, 4, 4, 4, 4), (0, 1, 2, 3, 4)])
@@ -827,10 +827,19 @@ class TestArraySetOps(TestCase):
assert_array_equal(setdiff1d(a, b), np.array(['c']))
+
+
+
class TestShapeBase(TestCase):
#
- def test_atleast1d(self):
- pass
+ def test_atleast2d(self):
+ "Test atleast_2d"
+ a = masked_array([0, 1, 2], mask=[0, 1, 0])
+ b = atleast_2d(a)
+ assert_equal(b.shape, (1, 3))
+ assert_equal(b.mask.shape, b.data.shape)
+ assert_equal(a.shape, (3,))
+ assert_equal(a.mask.shape, a.data.shape)
###############################################################################