Skip to content

Commit e4277e0

Browse files
committed
Fix Dataset rolling reduce
1 parent 3f13d0a commit e4277e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xarray/core/rolling.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,9 @@ def _dataset_implementation(self, func, keep_attrs, **kwargs):
744744
reduced[key].attrs = {}
745745

746746
attrs = self.obj.attrs if keep_attrs else {}
747-
return Dataset(reduced, coords=self.obj.coords, attrs=attrs)
747+
coords = self._get_rolling_dim_coords(all_dims=True)
748+
749+
return Dataset(reduced, coords=coords, attrs=attrs)
748750

749751
def reduce(self, func, keep_attrs=None, **kwargs):
750752
"""Reduce the items in this group by applying `func` along some

0 commit comments

Comments
 (0)