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

Method test_append_double

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

Source from the content-addressed store, hash-verified

589 assert_equal(test, control)
590
591 def test_append_double(self):
592 # Test simple case
593 (_, x, _, _) = self.data
594 test = append_fields(x, ('A', 'B'), data=[[10, 20, 30], [100, 200]])
595 control = ma.array([(1, 10, 100), (2, 20, 200), (-1, 30, -1)],
596 mask=[(0, 0, 0), (0, 0, 0), (1, 0, 1)],
597 dtype=[('f0', int), ('A', int), ('B', int)],)
598 assert_equal(test, control)
599
600 def test_append_on_flex(self):
601 # Test append_fields on flexible type arrays

Callers

nothing calls this directly

Calls 2

append_fieldsFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected