MCPcopy Index your code
hub / github.com/numpy/numpy / test_roundtrip

Method test_roundtrip

numpy/_core/tests/test_multiarray.py:6160–6165  ·  view source on GitHub ↗
(self, tmp_path, param_filename)

Source from the content-addressed store, hash-verified

6158 assert_array_equal(y, x.flat)
6159
6160 def test_roundtrip(self, tmp_path, param_filename):
6161 tmp_filename = normalize_filename(tmp_path, param_filename)
6162 x = self._create_data()
6163 x.tofile(tmp_filename)
6164 y = np.fromfile(tmp_filename, dtype=x.dtype)
6165 assert_array_equal(y, x.flat)
6166
6167 def test_roundtrip_dump_pathlib(self, tmp_path, param_filename):
6168 tmp_filename = normalize_filename(tmp_path, param_filename)

Callers

nothing calls this directly

Calls 4

_create_dataMethod · 0.95
assert_array_equalFunction · 0.90
normalize_filenameFunction · 0.85
tofileMethod · 0.80

Tested by

no test coverage detected