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

Method test_addfield

numpy/ma/tests/test_mrecords.py:479–485  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

477 assert_equal(mrectxt.C, [1, 2, 3.e+5, -1e-10])
478
479 def test_addfield(self):
480 # Tests addfield
481 (mrec, nrec, ddtype) = self.data
482 (d, m) = ([100, 200, 300], [1, 0, 0])
483 mrec = addfield(mrec, ma.array(d, mask=m))
484 assert_equal(mrec.f3, d)
485 assert_equal(mrec.f3._mask, m)
486
487
488def test_record_array_with_object_field():

Callers

nothing calls this directly

Calls 2

addfieldFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected