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

Method test_append_on_flex

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

append_fieldsFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected