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

Method test_append_double

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

Source from the content-addressed store, hash-verified

595 assert_equal(test, control)
596
597 def test_append_double(self):
598 # Test simple case
599 x = self._create_arrays()[1]
600 test = append_fields(x, ('A', 'B'), data=[[10, 20, 30], [100, 200]])
601 control = ma.array([(1, 10, 100), (2, 20, 200), (-1, 30, -1)],
602 mask=[(0, 0, 0), (0, 0, 0), (1, 0, 1)],
603 dtype=[('f0', int), ('A', int), ('B', int)],)
604 assert_equal(test, control)
605
606 def test_append_on_flex(self):
607 # Test append_fields on flexible type arrays

Callers

nothing calls this directly

Calls 3

_create_arraysMethod · 0.95
append_fieldsFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected