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

Method test_unnamed_fields

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

stack_arraysFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected