MCPcopy Index your code
hub / github.com/pydata/xarray / sliding_window_view

Function sliding_window_view

xarray/compat/dask_array_compat.py:19–32  ·  view source on GitHub ↗
(
    x, window_shape, axis=None, *, automatic_rechunk=True, **kwargs
)

Source from the content-addressed store, hash-verified

17
18
19def 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)

Callers

nothing calls this directly

Calls 1

module_availableFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…