home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 670988661

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-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) <ipython-input-38-e6e456ecd183> in <module> ----> 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_dims (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
Powered by Datasette · Queries took 0.602ms · About: xarray-datasette