MCPcopy Index your code
hub / github.com/numpy/numpy / test_void0d

Method test_void0d

numpy/ma/tests/test_core.py:1009–1021  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1007 assert_equal(test.dtype, control.dtype)
1008
1009 def test_void0d(self):
1010 # Test creating a mvoid object
1011 ndtype = [('a', int), ('b', int)]
1012 a = np.array([(1, 2,)], dtype=ndtype)[0]
1013 f = mvoid(a)
1014 assert_(isinstance(f, mvoid))
1015
1016 a = masked_array([(1, 2)], mask=[(1, 0)], dtype=ndtype)[0]
1017 assert_(isinstance(a, mvoid))
1018
1019 a = masked_array([(1, 2), (1, 2)], mask=[(1, 0), (0, 0)], dtype=ndtype)
1020 f = mvoid(a._data[0], a._mask[0])
1021 assert_(isinstance(f, mvoid))
1022
1023 def test_mvoid_getitem(self):
1024 # Test mvoid.__getitem__

Callers

nothing calls this directly

Calls 2

mvoidClass · 0.90
assert_Function · 0.85

Tested by

no test coverage detected