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

Function read_file

tools/verification_utils.py:24–41  ·  view source on GitHub ↗

Read a file from disk Parameters: ----------- fname : string specifying the absolute path to the file to read ftype : string supported formats are `numpy`, `parquet', `csv` Returns: -------- numpy ndarray : file contents are returned as numpy arra

(fname, ftype)

Source from the content-addressed store, hash-verified

22
23
24def read_file(fname, ftype):
25 """Read a file from disk
26 Parameters:
27 -----------
28 fname : string
29 specifying the absolute path to the file to read
30 ftype : string
31 supported formats are `numpy`, `parquet', `csv`
32
33 Returns:
34 --------
35 numpy ndarray :
36 file contents are returned as numpy array
37 """
38 reader_fmt_meta = {"name": ftype}
39 array_readwriter.get_array_parser(**reader_fmt_meta).read(fname)
40
41 return data
42
43
44def verify_partition_data_types(part_g):

Callers 2

_read_graphFunction · 0.90
get_node_partidsFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected