MCPcopy
hub / github.com/dmlc/dgl / read

Method read

tools/distpartitioning/array_readwriter/csv.py:15–27  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

13 self.delimiter = delimiter
14
15 def read(self, path):
16 logging.debug(
17 "Reading from %s using CSV format with configuration %s"
18 % (path, self.__dict__)
19 )
20 # do not read the first line as header
21 read_options = pyarrow.csv.ReadOptions(autogenerate_column_names=True)
22 parse_options = pyarrow.csv.ParseOptions(delimiter=self.delimiter)
23 arr = pyarrow.csv.read_csv(
24 path, read_options=read_options, parse_options=parse_options
25 )
26 logging.debug("Done reading from %s" % path)
27 return arr.to_pandas().to_numpy()
28
29 def write(self, path, arr):
30 logging.debug(

Callers 15

read_fileFunction · 0.45
_chunk_graphFunction · 0.45
gen_edge_filesFunction · 0.45
get_datasetFunction · 0.45
test_array_readwriterFunction · 0.45
_chunk_graphFunction · 0.45
test_dataFunction · 0.45
_read_fileFunction · 0.45

Calls 2

debugMethod · 0.80
read_csvMethod · 0.80

Tested by 15

test_array_readwriterFunction · 0.36
_chunk_graphFunction · 0.36
test_dataFunction · 0.36
_read_fileFunction · 0.36
test_gpu_cached_featureFunction · 0.36
test_disk_based_featureFunction · 0.36