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

Method test_version0_int8

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

Source from the content-addressed store, hash-verified

4326 # version 0 pickles, using protocol=2 to pickle
4327 # version 0 doesn't have a version field
4328 def test_version0_int8(self):
4329 s = b'\x80\x02cnumpy.core._internal\n_reconstruct\nq\x01cnumpy\nndarray\nq\x02K\x00\x85U\x01b\x87Rq\x03(K\x04\x85cnumpy\ndtype\nq\x04U\x02i1K\x00K\x01\x87Rq\x05(U\x01|NNJ\xff\xff\xff\xffJ\xff\xff\xff\xfftb\x89U\x04\x01\x02\x03\x04tb.'
4330 a = np.array([1, 2, 3, 4], dtype=np.int8)
4331 p = self._loads(s)
4332 assert_equal(a, p)
4333
4334 def test_version0_float32(self):
4335 s = b'\x80\x02cnumpy.core._internal\n_reconstruct\nq\x01cnumpy\nndarray\nq\x02K\x00\x85U\x01b\x87Rq\x03(K\x04\x85cnumpy\ndtype\nq\x04U\x02f4K\x00K\x01\x87Rq\x05(U\x01<NNJ\xff\xff\xff\xffJ\xff\xff\xff\xfftb\x89U\x10\x00\x00\x80?\x00\x00\x00@\x00\x00@@\x00\x00\x80@tb.'

Callers

nothing calls this directly

Calls 2

_loadsMethod · 0.95
assert_equalFunction · 0.90

Tested by

no test coverage detected