(arr, fmt_meta, chunk_sizes, path_fmt)
| 13 | |
| 14 | |
| 15 | def chunk_numpy_array(arr, fmt_meta, chunk_sizes, path_fmt): |
| 16 | paths = [] |
| 17 | offset = 0 |
| 18 | |
| 19 | for j, n in enumerate(chunk_sizes): |
| 20 | path = os.path.abspath(path_fmt % j) |
| 21 | arr_chunk = arr[offset : offset + n] |
| 22 | logging.info("Chunking %d-%d" % (offset, offset + n)) |
| 23 | array_readwriter.get_array_parser(**fmt_meta).write(path, arr_chunk) |
| 24 | offset += n |
| 25 | paths.append(path) |
| 26 | |
| 27 | return paths |
| 28 | |
| 29 | |
| 30 | def _chunk_graph( |
no test coverage detected