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

Method test_standard

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

Source from the content-addressed store, hash-verified

474 assert_equal(test, control)
475
476 def test_standard(self):
477 # Test standard & standard
478 # Test merge arrays
479 (_, x, y, _) = self.data
480 test = merge_arrays((x, y), usemask=False)
481 control = np.array([(1, 10), (2, 20), (-1, 30)],
482 dtype=[('f0', int), ('f1', int)])
483 assert_equal(test, control)
484
485 test = merge_arrays((x, y), usemask=True)
486 control = ma.array([(1, 10), (2, 20), (-1, 30)],
487 mask=[(0, 0), (0, 0), (1, 0)],
488 dtype=[('f0', int), ('f1', int)])
489 assert_equal(test, control)
490 assert_equal(test.mask, control.mask)
491
492 def test_flatten(self):
493 # Test standard & flexible

Callers

nothing calls this directly

Calls 2

merge_arraysFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected