Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xarray/core/variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ def rolling_window(
raise ValueError(
f"Expected {name}={arg!r} to be a scalar like 'dim'."
)
dim = [dim]
dim = (dim,)

# dim is now a list
nroll = len(dim)
Expand Down Expand Up @@ -2193,7 +2193,7 @@ def rolling_window(
pads[d] = (win - 1, 0)

padded = var.pad(pads, mode="constant", constant_values=fill_value)
axis = tuple(self.get_axis_num(d) for d in dim)
axis = self.get_axis_num(dim)
new_dims = self.dims + tuple(window_dim)
return Variable(
new_dims,
Expand Down