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

Method test_append_single

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

Source from the content-addressed store, hash-verified

580 self.data = (w, x, y, z)
581
582 def test_append_single(self):
583 # Test simple case
584 (_, x, _, _) = self.data
585 test = append_fields(x, 'A', data=[10, 20, 30])
586 control = ma.array([(1, 10), (2, 20), (-1, 30)],
587 mask=[(0, 0), (0, 0), (1, 0)],
588 dtype=[('f0', int), ('A', int)],)
589 assert_equal(test, control)
590
591 def test_append_double(self):
592 # Test simple case

Callers

nothing calls this directly

Calls 2

append_fieldsFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected