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

Method test_append_on_flex

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

Source from the content-addressed store, hash-verified

604 assert_equal(test, control)
605
606 def test_append_on_flex(self):
607 # Test append_fields on flexible type arrays
608 z = self._create_arrays()[-1]
609 test = append_fields(z, 'C', data=[10, 20, 30])
610 control = ma.array([('A', 1., 10), ('B', 2., 20), (-1, -1., 30)],
611 mask=[(0, 0, 0), (0, 0, 0), (1, 1, 0)],
612 dtype=[('A', '|S3'), ('B', float), ('C', int)],)
613 assert_equal(test, control)
614
615 def test_append_on_nested(self):
616 # Test append_fields on nested fields

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