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

Method test_pickle

numpy/core/tests/test_multiarray.py:1797–1804  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1795 assert_equal(zs, pickle.loads(zs.dumps()))
1796
1797 def test_pickle(self):
1798 for proto in range(2, pickle.HIGHEST_PROTOCOL + 1):
1799 for dt in [bytes, np.void, str]:
1800 zs = self._zeros(10, dt)
1801 p = pickle.dumps(zs, protocol=proto)
1802 zs2 = pickle.loads(p)
1803
1804 assert_equal(zs.dtype, zs2.dtype)
1805
1806 def test_pickle_empty(self):
1807 """Checking if an empty array pickled and un-pickled will not cause a

Callers

nothing calls this directly

Calls 2

_zerosMethod · 0.95
assert_equalFunction · 0.90

Tested by

no test coverage detected