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

Method test_checktitles

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

stack_arraysFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected