MCPcopy Index your code
hub / github.com/ray-project/ray / NumpyDatasink

Class NumpyDatasink

python/ray/data/_internal/datasource/numpy_datasink.py:8–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8class NumpyDatasink(BlockBasedFileDatasink):
9 def __init__(
10 self,
11 path: str,
12 column: str,
13 *,
14 file_format: str = "npy",
15 **file_datasink_kwargs,
16 ):
17 super().__init__(path, file_format=file_format, **file_datasink_kwargs)
18
19 self.column = column
20
21 def write_block_to_file(self, block: BlockAccessor, file: "pyarrow.NativeFile"):
22 value = block.to_numpy(self.column)
23 np.save(file, value)

Callers 1

write_numpyMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…