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

Method test_checktitles

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

Source from the content-addressed store, hash-verified

751 stack_arrays((a, b), autoconvert=False)
752
753 def test_checktitles(self):
754 # Test using titles in the field names
755 adtype = [(('a', 'A'), int), (('b', 'B'), bool), (('c', 'C'), float)]
756 a = ma.array([(1, 2, 3)], mask=[(0, 1, 0)], dtype=adtype)
757 bdtype = [(('a', 'A'), int), (('b', 'B'), bool), (('c', 'C'), float)]
758 b = ma.array([(4, 5, 6)], dtype=bdtype)
759 test = stack_arrays((a, b))
760 control = ma.array([(1, 2, 3), (4, 5, 6)], mask=[(0, 1, 0), (0, 0, 0)],
761 dtype=bdtype)
762 assert_equal(test, control)
763 assert_equal(test.mask, control.mask)
764
765 def test_subdtype(self):
766 z = np.array([

Callers

nothing calls this directly

Calls 2

stack_arraysFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected