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

Method test_standard

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

Source from the content-addressed store, hash-verified

482 assert_equal(test, control)
483
484 def test_standard(self):
485 # Test standard & standard
486 # Test merge arrays
487 _, x, y, _ = self._create_arrays()
488 test = merge_arrays((x, y), usemask=False)
489 control = np.array([(1, 10), (2, 20), (-1, 30)],
490 dtype=[('f0', int), ('f1', int)])
491 assert_equal(test, control)
492
493 test = merge_arrays((x, y), usemask=True)
494 control = ma.array([(1, 10), (2, 20), (-1, 30)],
495 mask=[(0, 0), (0, 0), (1, 0)],
496 dtype=[('f0', int), ('f1', int)])
497 assert_equal(test, control)
498 assert_equal(test.mask, control.mask)
499
500 def test_flatten(self):
501 # Test standard & flexible

Callers

nothing calls this directly

Calls 3

_create_arraysMethod · 0.95
merge_arraysFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected