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

Method test_wmasked_arrays

numpy/lib/tests/test_recfunctions.py:530–541  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

528 assert_equal(test, control)
529
530 def test_wmasked_arrays(self):
531 # Test merge_arrays masked arrays
532 x = self._create_arrays()[1]
533 mx = ma.array([1, 2, 3], mask=[1, 0, 0])
534 test = merge_arrays((x, mx), usemask=True)
535 control = ma.array([(1, 1), (2, 2), (-1, 3)],
536 mask=[(0, 1), (0, 0), (1, 0)],
537 dtype=[('f0', int), ('f1', int)])
538 assert_equal(test, control)
539 test = merge_arrays((x, mx), usemask=True, asrecarray=True)
540 assert_equal(test, control)
541 assert_(isinstance(test, MaskedRecords))
542
543 def test_w_singlefield(self):
544 # Test single field

Callers

nothing calls this directly

Calls 4

_create_arraysMethod · 0.95
merge_arraysFunction · 0.90
assert_equalFunction · 0.90
assert_Function · 0.90

Tested by

no test coverage detected