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)
| 22 | |
| 23 | |
| 24 | def 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 | |
| 44 | def verify_partition_data_types(part_g): |
no test coverage detected