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

Method test_roundtrip

numpy/core/tests/test_multiarray.py:5329–5332  ·  view source on GitHub ↗
(self, x, tmp_filename)

Source from the content-addressed store, hash-verified

5327 assert_array_equal(y, x.flat)
5328
5329 def test_roundtrip(self, x, tmp_filename):
5330 x.tofile(tmp_filename)
5331 y = np.fromfile(tmp_filename, dtype=x.dtype)
5332 assert_array_equal(y, x.flat)
5333
5334 def test_roundtrip_dump_pathlib(self, x, tmp_filename):
5335 p = pathlib.Path(tmp_filename)

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
tofileMethod · 0.80

Tested by

no test coverage detected