diff --git a/xarray/core/variable.py b/xarray/core/variable.py index 83ccbc9a1cf..9271d0c4dbd 100644 --- a/xarray/core/variable.py +++ b/xarray/core/variable.py @@ -2484,7 +2484,7 @@ def rolling_window( pads[d] = (win - 1, 0) padded = var.pad(pads, mode="constant", constant_values=fill_value) - axis = [self.get_axis_num(d) for d in dim] + axis = tuple(self.get_axis_num(d) for d in dim) new_dims = self.dims + tuple(window_dim) return Variable( new_dims,