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

Method test_fromflex

numpy/ma/tests/test_core.py:4042–4058  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4040 assert_equal_records(record['_mask'], data._mask)
4041
4042 def test_fromflex(self):
4043 # Test the reconstruction of a masked_array from a record
4044 a = array([1, 2, 3])
4045 test = fromflex(a.toflex())
4046 assert_equal(test, a)
4047 assert_equal(test.mask, a.mask)
4048
4049 a = array([1, 2, 3], mask=[0, 0, 1])
4050 test = fromflex(a.toflex())
4051 assert_equal(test, a)
4052 assert_equal(test.mask, a.mask)
4053
4054 a = array([(1, 1.), (2, 2.), (3, 3.)], mask=[(1, 0), (0, 0), (0, 1)],
4055 dtype=[('A', int), ('B', float)])
4056 test = fromflex(a.toflex())
4057 assert_equal(test, a)
4058 assert_equal(test.data, a.data)
4059
4060 def test_arraymethod(self):
4061 # Test a _arraymethod w/ n argument

Callers

nothing calls this directly

Calls 4

arrayFunction · 0.90
fromflexFunction · 0.90
assert_equalFunction · 0.90
toflexMethod · 0.80

Tested by

no test coverage detected