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

Method test_unnamed_fields

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

Source from the content-addressed store, hash-verified

650 assert_(test is x)
651
652 def test_unnamed_fields(self):
653 # Tests combinations of arrays w/o named fields
654 _, x, y, _ = self._create_arrays()
655
656 test = stack_arrays((x, x), usemask=False)
657 control = np.array([1, 2, 1, 2])
658 assert_equal(test, control)
659
660 test = stack_arrays((x, y), usemask=False)
661 control = np.array([1, 2, 10, 20, 30])
662 assert_equal(test, control)
663
664 test = stack_arrays((y, x), usemask=False)
665 control = np.array([10, 20, 30, 1, 2])
666 assert_equal(test, control)
667
668 def test_unnamed_and_named_fields(self):
669 # Test combination of arrays w/ & w/o named fields

Callers

nothing calls this directly

Calls 3

_create_arraysMethod · 0.95
stack_arraysFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected