MCPcopy Create free account
hub / github.com/numpy/numpy / test_void0d

Method test_void0d

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

Source from the content-addressed store, hash-verified

902 assert_equal(test.dtype, control.dtype)
903
904 def test_void0d(self):
905 # Test creating a mvoid object
906 ndtype = [('a', int), ('b', int)]
907 a = np.array([(1, 2,)], dtype=ndtype)[0]
908 f = mvoid(a)
909 assert_(isinstance(f, mvoid))
910
911 a = masked_array([(1, 2)], mask=[(1, 0)], dtype=ndtype)[0]
912 assert_(isinstance(a, mvoid))
913
914 a = masked_array([(1, 2), (1, 2)], mask=[(1, 0), (0, 0)], dtype=ndtype)
915 f = mvoid(a._data[0], a._mask[0])
916 assert_(isinstance(f, mvoid))
917
918 def test_mvoid_getitem(self):
919 # Test mvoid.__getitem__

Callers

nothing calls this directly

Calls 2

mvoidClass · 0.90
assert_Function · 0.50

Tested by

no test coverage detected