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

Method test_pickling

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

Source from the content-addressed store, hash-verified

281 assert_equal(mbase['a']._mask, mbase['b']._mask)
282
283 def test_pickling(self):
284 # Test pickling
285 base = self.base.copy()
286 mrec = base.view(mrecarray)
287 for proto in range(2, pickle.HIGHEST_PROTOCOL + 1):
288 _ = pickle.dumps(mrec, protocol=proto)
289 mrec_ = pickle.loads(_)
290 assert_equal(mrec_.dtype, mrec.dtype)
291 assert_equal_records(mrec_._data, mrec._data)
292 assert_equal(mrec_._mask, mrec._mask)
293 assert_equal_records(mrec_._mask, mrec._mask)
294
295 def test_filled(self):
296 # 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