(
x: Any,
shape: int | tuple[int, ...],
chunks: tuple[tuple[int, ...], ...] | None = None,
)
| 4 | |
| 5 | |
| 6 | def reshape_blockwise( |
| 7 | x: Any, |
| 8 | shape: int | tuple[int, ...], |
| 9 | chunks: tuple[tuple[int, ...], ...] | None = None, |
| 10 | ): |
| 11 | if module_available("dask", "2024.08.2"): |
| 12 | from dask.array import reshape_blockwise |
| 13 | |
| 14 | return reshape_blockwise(x, shape=shape, chunks=chunks) |
| 15 | else: |
| 16 | return x.reshape(shape) |
| 17 | |
| 18 | |
| 19 | def sliding_window_view( |
no test coverage detected
searching dependent graphs…