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

Method test_pickle_transposed

numpy/core/tests/test_regression.py:31–39  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

29 np.empty((1,), dtype=[('x', np.int64)])
30
31 def test_pickle_transposed(self):
32 # Ticket #16
33 a = np.transpose(np.array([[2, 9], [7, 0], [3, 8]]))
34 for proto in range(2, pickle.HIGHEST_PROTOCOL + 1):
35 with BytesIO() as f:
36 pickle.dump(a, f, protocol=proto)
37 f.seek(0)
38 b = pickle.load(f)
39 assert_array_equal(a, b)
40
41 def test_dtype_names(self):
42 # Ticket #35

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
seekMethod · 0.80

Tested by

no test coverage detected