(
x, window_shape, axis=None, *, automatic_rechunk=True, **kwargs
)
| 17 | |
| 18 | |
| 19 | def sliding_window_view( |
| 20 | x, window_shape, axis=None, *, automatic_rechunk=True, **kwargs |
| 21 | ): |
| 22 | # Backcompat for handling `automatic_rechunk`, delete when dask>=2024.11.0 |
| 23 | # Note that subok, writeable are unsupported by dask, so we ignore those in kwargs |
| 24 | from dask.array.lib.stride_tricks import sliding_window_view |
| 25 | |
| 26 | if module_available("dask", "2024.11.0"): |
| 27 | return sliding_window_view( |
| 28 | x, window_shape=window_shape, axis=axis, automatic_rechunk=automatic_rechunk |
| 29 | ) |
| 30 | else: |
| 31 | # automatic_rechunk is not supported |
| 32 | return sliding_window_view(x, window_shape=window_shape, axis=axis) |
nothing calls this directly
no test coverage detected
searching dependent graphs…