(path, dtype=float)
| 79 | |
| 80 | |
| 81 | def _load_data_as_dict(path, dtype=float): |
| 82 | data_dict = collections.defaultdict(list) |
| 83 | for file_name in _get_file_list(path): |
| 84 | with open(file_name, "r") as fin: |
| 85 | for line in fin: |
| 86 | vec = line.strip().split(' ') |
| 87 | data_dict[vec[0]] = [dtype(x) for x in vec[1:]] |
| 88 | return data_dict |
| 89 | |
| 90 | |
| 91 | def _parse_args(): |
no test coverage detected