html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/pull/4329#issuecomment-671043071,https://api.github.com/repos/pydata/xarray/issues/4329,671043071,MDEyOklzc3VlQ29tbWVudDY3MTA0MzA3MQ==,14808389,2020-08-09T11:57:24Z,2020-08-09T13:15:50Z,MEMBER,"all CI pass. Thanks for the quick fixes, @fujiisoup ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,675604714
https://github.com/pydata/xarray/pull/4329#issuecomment-671041448,https://api.github.com/repos/pydata/xarray/issues/4329,671041448,MDEyOklzc3VlQ29tbWVudDY3MTA0MTQ0OA==,14808389,2020-08-09T11:40:50Z,2020-08-09T11:44:14Z,MEMBER,"thanks, that fixed the build on my own RTD setup, but the main setup is quite a bit slower...
Edit: it passed on the main setup, too. Let's merge on green.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,675604714
https://github.com/pydata/xarray/pull/4329#issuecomment-671036572,https://api.github.com/repos/pydata/xarray/issues/4329,671036572,MDEyOklzc3VlQ29tbWVudDY3MTAzNjU3Mg==,6815844,2020-08-09T10:49:35Z,2020-08-09T10:49:35Z,MEMBER,"Thanks, @keewis , for the clarification.
It was a bug in the documentation page but not in `rolling.construct`.
It should raise an error in this case, because for 2d rolling we need 2 dimension names,
```python
rolling_da = r.construct(x=""x_win"", y='y_win' , stride=2)
```
I corrected the documentation and error message.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,675604714
https://github.com/pydata/xarray/pull/4329#issuecomment-671035364,https://api.github.com/repos/pydata/xarray/issues/4329,671035364,MDEyOklzc3VlQ29tbWVudDY3MTAzNTM2NA==,14808389,2020-08-09T10:35:43Z,2020-08-09T10:48:40Z,MEMBER,"normally you'd look at the output of the RTD build, but somehow just the official setup times out instead of printing the log so I put in a support request on RTD.
I can reproduce the failure using:
```python
In [1]: import xarray as xr
...: import numpy as np
...:
...: arr = xr.DataArray(np.arange(0, 7.5, 0.5).reshape(3, 5), dims=(""x"", ""y""))
...: display(arr)
...: r = arr.rolling(x=2, y=3, min_periods=2)
...: display(r)
...:
...: rolling_da = r.construct(""window_dim"", stride=2)
...: display(rolling_da)
array([[0. , 0.5, 1. , 1.5, 2. ],
[2.5, 3. , 3.5, 4. , 4.5],
[5. , 5.5, 6. , 6.5, 7. ]])
Dimensions without coordinates: x, y
DataArrayRolling [x->2,y->3]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in
7 display(r)
8
----> 9 rolling_da = r.construct(""window_dim"", stride=2)
10 display(rolling_da)
11 rolling_da.mean(""window_dim"", skipna=False)
.../xarray/core/rolling.py in construct(self, window_dim, stride, fill_value, **window_dim_kwargs)
277 window_dim = {d: window_dim_kwargs[d] for d in self.dim}
278
--> 279 window_dim = self._mapping_to_list(
280 window_dim, allow_default=False, allow_allsame=False
281 )
.../xarray/core/rolling.py in _mapping_to_list(self, arg, default, allow_default, allow_allsame)
157 return [arg]
158 else:
--> 159 raise ValueError(""Mapping argument is necessary."")
160
161
ValueError: Mapping argument is necessary.
```
so the bug is in `Rolling.construct`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,675604714
https://github.com/pydata/xarray/pull/4329#issuecomment-670988661,https://api.github.com/repos/pydata/xarray/issues/4329,670988661,MDEyOklzc3VlQ29tbWVudDY3MDk4ODY2MQ==,14808389,2020-08-09T00:30:12Z,2020-08-09T10:48:31Z,MEMBER,"This looks good to me. Unfortunately, now that the `repr` is fixed, we run into a separate issue, triggered by https://github.com/pydata/xarray/blob/7e1fbf87b898851d26de3eb3ab328637d61437bc/doc/computation.rst#L236-L237
Traceback
```pytb
ValueError Traceback (most recent call last)
in
----> 1 rolling_da = r.construct(""window_dim"", stride=2)
.../xarray/core/rolling.py in construct(self, window_dim, stride, fill_value, **window_dim_kwargs)
277 window_dim = {d: window_dim_kwargs[d] for d in self.dim}
278
--> 279 window_dim = self._mapping_to_list(
280 window_dim, allow_default=False, allow_allsame=False
281 )
.../xarray/core/rolling.py in _mapping_to_list(self, arg, default, allow_default, allow_allsame)
157 return [arg]
158 else:
--> 159 raise ValueError(""Mapping argument is necessary."")
160
161
ValueError: Mapping argument is necessary.
```
Edit: what do you think about using this to fix `str`-typed `window_dim`s (while it works I'm not sure if that actually makes sense, though):
```diff
diff --git a/xarray/core/rolling.py b/xarray/core/rolling.py
index 62d14fad..a5f83250 100644
--- a/xarray/core/rolling.py
+++ b/xarray/core/rolling.py
@@ -275,6 +275,8 @@ class DataArrayRolling(Rolling):
""Either window_dim or window_dim_kwargs need to be specified.""
)
window_dim = {d: window_dim_kwargs[d] for d in self.dim}
+ elif isinstance(window_dim, str):
+ window_dim = {d: window_dim for d in self.dim}
window_dim = self._mapping_to_list(
window_dim, allow_default=False, allow_allsame=False
```
Edit2: that should be the last docs-only failure related to ""rolling"", I can build the docs locally with that change.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,675604714
https://github.com/pydata/xarray/pull/4329#issuecomment-670993724,https://api.github.com/repos/pydata/xarray/issues/4329,670993724,MDEyOklzc3VlQ29tbWVudDY3MDk5MzcyNA==,6815844,2020-08-09T01:43:22Z,2020-08-09T01:43:22Z,MEMBER,"Thanks @keewis for checking.
I'm not sure what causes the error in `rolling_da.mean(""window_dim"", skipna=False) `
`self._mapping_to_list` should handle this problem.
How can I get the details of this error?
I just saw the time-out error...
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,675604714