Skip to content
Discussion options

You must be logged in to vote

This looks like the common boundary condition, for which I'd use DataArray.pad:

da.pad({"time": 1}, mode="wrap").rolling(time=3, min_periods=2, center=True).mean().isel(time=slice(1, -1))

This should work with any kind of duck array, including dask and numpy.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by yt87
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants