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

Method test_version0_object

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

Source from the content-addressed store, hash-verified

4338 assert_equal(a, p)
4339
4340 def test_version0_object(self):
4341 s = b'\x80\x02cnumpy.core._internal\n_reconstruct\nq\x01cnumpy\nndarray\nq\x02K\x00\x85U\x01b\x87Rq\x03(K\x02\x85cnumpy\ndtype\nq\x04U\x02O8K\x00K\x01\x87Rq\x05(U\x01|NNJ\xff\xff\xff\xffJ\xff\xff\xff\xfftb\x89]q\x06(}q\x07U\x01aK\x01s}q\x08U\x01bK\x02setb.'
4342 a = np.array([{'a': 1}, {'b': 2}])
4343 p = self._loads(s)
4344 assert_equal(a, p)
4345
4346 # version 1 pickles, using protocol=2 to pickle
4347 def test_version1_int8(self):

Callers

nothing calls this directly

Calls 2

_loadsMethod · 0.95
assert_equalFunction · 0.90

Tested by

no test coverage detected