home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 671035364

This data as json

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-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) <xarray.DataArray (x: 3, y: 5)> 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) <ipython-input-1-f9a10c0cfaeb> in <module> 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 inRolling.construct`.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  675604714
Powered by Datasette · Queries took 158.936ms · About: xarray-datasette