Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Oct 11, 2012
1 parent 7caac2e commit 1532b7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions numpy/ma/tests/test_core.py
Expand Up @@ -626,7 +626,7 @@ def test_mvoid_getitem(self):
a = masked_array([(1, 2,), (3, 4)], mask=[(0, 0), (1, 0)], dtype=ndtype)
# w/o mask
f = a[0]
self.assertTrue(isinstance(f, np.void))
self.assertTrue(isinstance(f, mvoid))
assert_equal((f[0], f['a']), (1, 1))
assert_equal(f['b'], 2)
# w/ mask
Expand Down Expand Up @@ -3443,7 +3443,7 @@ def test_getitem(self):
[1, 0, 0, 0, 0, 0, 0, 0, 1, 0]),
dtype=[('a', bool), ('b', bool)])
# No mask
self.assertTrue(isinstance(a[1], np.void))
self.assertTrue(isinstance(a[1], MaskedArray))
# One element masked
self.assertTrue(isinstance(a[0], MaskedArray))
assert_equal_records(a[0]._data, a._data[0])
Expand Down Expand Up @@ -3503,7 +3503,7 @@ def test_view_to_flexible_dtype(self):
assert_equal(test['B'], a['b'][0])
#
test = a[-1].view([('A', float), ('B', float)])
self.assertTrue(not isinstance(test, MaskedArray))
self.assertTrue(isinstance(test, MaskedArray))
assert_equal(test.dtype.names, ('A', 'B'))
assert_equal(test['A'], a['a'][-1])
assert_equal(test['B'], a['b'][-1])
Expand All @@ -3523,7 +3523,7 @@ def test_view_to_subdtype(self):
assert_equal(test.mask, (1, 0))
# View on 1 unmasked element
test = a[-1].view((float, 2))
self.assertTrue(not isinstance(test, MaskedArray))
self.assertTrue(isinstance(test, MaskedArray))
assert_equal(test, data[-1])
#
def test_view_to_dtype_and_type(self):
Expand Down

0 comments on commit 1532b7c

Please sign in to comment.