Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed failing tests

  • Loading branch information...
commit 1532b7cce4a296d2fc5a6ef2eea68376c57daa19 1 parent 7caac2e
@astrofrog astrofrog authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 numpy/ma/tests/test_core.py
View
8 numpy/ma/tests/test_core.py
@@ -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
@@ -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])
@@ -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])
@@ -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):
Please sign in to comment.
Something went wrong with that request. Please try again.