home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 675604714 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 2

  • keewis 4
  • fujiisoup 2

issue 1

  • ndrolling repr fix · 6 ✖

author_association 1

  • MEMBER 6
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
671043071 https://github.com/pydata/xarray/pull/4329#issuecomment-671043071 https://api.github.com/repos/pydata/xarray/issues/4329 MDEyOklzc3VlQ29tbWVudDY3MTA0MzA3MQ== keewis 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
}
  ndrolling repr fix 675604714
671041448 https://github.com/pydata/xarray/pull/4329#issuecomment-671041448 https://api.github.com/repos/pydata/xarray/issues/4329 MDEyOklzc3VlQ29tbWVudDY3MTA0MTQ0OA== keewis 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
}
  ndrolling repr fix 675604714
671036572 https://github.com/pydata/xarray/pull/4329#issuecomment-671036572 https://api.github.com/repos/pydata/xarray/issues/4329 MDEyOklzc3VlQ29tbWVudDY3MTAzNjU3Mg== fujiisoup 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
}
  ndrolling repr fix 675604714
671035364 https://github.com/pydata/xarray/pull/4329#issuecomment-671035364 https://api.github.com/repos/pydata/xarray/issues/4329 MDEyOklzc3VlQ29tbWVudDY3MTAzNTM2NA== keewis 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
}
  ndrolling repr fix 675604714
670988661 https://github.com/pydata/xarray/pull/4329#issuecomment-670988661 https://api.github.com/repos/pydata/xarray/issues/4329 MDEyOklzc3VlQ29tbWVudDY3MDk4ODY2MQ== keewis 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
}
  ndrolling repr fix 675604714
670993724 https://github.com/pydata/xarray/pull/4329#issuecomment-670993724 https://api.github.com/repos/pydata/xarray/issues/4329 MDEyOklzc3VlQ29tbWVudDY3MDk5MzcyNA== fujiisoup 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
}
  ndrolling repr fix 675604714

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 13.923ms · About: xarray-datasette