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

Method test_pickling

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

Source from the content-addressed store, hash-verified

283 assert_equal(mbase['a']._mask, mbase['b']._mask)
284
285 def test_pickling(self):
286 # Test pickling
287 base = self.base.copy()
288 mrec = base.view(mrecarray)
289 for proto in range(2, pickle.HIGHEST_PROTOCOL + 1):
290 _ = pickle.dumps(mrec, protocol=proto)
291 mrec_ = pickle.loads(_)
292 assert_equal(mrec_.dtype, mrec.dtype)
293 assert_equal_records(mrec_._data, mrec._data)
294 assert_equal(mrec_._mask, mrec._mask)
295 assert_equal_records(mrec_._mask, mrec._mask)
296
297 def test_filled(self):
298 # Test filling the array

Callers

nothing calls this directly

Calls 4

assert_equalFunction · 0.90
assert_equal_recordsFunction · 0.90
copyMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected