MCPcopy
hub / github.com/ray-project/ray / test_numpy_write

Function test_numpy_write

python/ray/data/tests/datasource/test_numpy.py:109–117  ·  view source on GitHub ↗
(ray_start_regular_shared, tmp_path)

Source from the content-addressed store, hash-verified

107
108
109def test_numpy_write(ray_start_regular_shared, tmp_path):
110 ds = ray.data.range_tensor(1)
111
112 ds.write_numpy(tmp_path, column="data")
113
114 actual_array = np.concatenate(
115 [np.load(os.path.join(tmp_path, filename)) for filename in os.listdir(tmp_path)]
116 )
117 assert actual_array == np.array((0,))
118
119
120if __name__ == "__main__":

Callers

nothing calls this directly

Calls 4

write_numpyMethod · 0.80
loadMethod · 0.80
listdirMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…