home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 321917084 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • raybellwaves 2
  • shoyer 1
  • fujiisoup 1

author_association 2

  • CONTRIBUTOR 2
  • MEMBER 2

issue 1

  • Rolling mean of dask array conflicting sizes for data and coordinate in rolling operation · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
388509895 https://github.com/pydata/xarray/issues/2113#issuecomment-388509895 https://api.github.com/repos/pydata/xarray/issues/2113 MDEyOklzc3VlQ29tbWVudDM4ODUwOTg5NQ== fujiisoup 6815844 2018-05-11T23:27:22Z 2018-05-12T00:25:25Z MEMBER

~I noticed that this bug arises when bottleneck is installed.~

EDIT The test suite was not checking center=True. I will look inside the code.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rolling mean of dask array conflicting sizes for data and coordinate in rolling operation 321917084
388489805 https://github.com/pydata/xarray/issues/2113#issuecomment-388489805 https://api.github.com/repos/pydata/xarray/issues/2113 MDEyOklzc3VlQ29tbWVudDM4ODQ4OTgwNQ== raybellwaves 17162724 2018-05-11T21:25:32Z 2018-05-11T21:25:50Z CONTRIBUTOR

I realized there with an issue before that in without center=True it doesn't raise an issue but it returns rubbish:

``` import xarray as xr import numpy as np

a = xr.DataArray(np.arange(1,4), coords=[np.arange(1,4)], dims='x') print(a.rolling(x=3, center=True).mean()) Out[2]: <xarray.DataArray (x: 3)> array([ nan, 2., nan]) Coordinates: * x (x) int64 1 2 3 print(a.chunk().rolling(x=3).mean().values) Out[3]: array([ -6.14891469e+18, -9.22337204e+18, -1.22978294e+19]) ```

The culprit lies in a dask function https://github.com/pydata/xarray/blob/6d8ac11ca0a785a6fe176eeca9b735c321a35527/xarray/core/dask_array_ops.py#L24

Not sure if this is an issue with the function or the way the data is going into the function.

For the center=True issue: https://github.com/pydata/xarray/blob/6d8ac11ca0a785a6fe176eeca9b735c321a35527/xarray/core/rolling.py#L308 is slicing the data.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rolling mean of dask array conflicting sizes for data and coordinate in rolling operation 321917084
388099066 https://github.com/pydata/xarray/issues/2113#issuecomment-388099066 https://api.github.com/repos/pydata/xarray/issues/2113 MDEyOklzc3VlQ29tbWVudDM4ODA5OTA2Ng== shoyer 1217238 2018-05-10T16:00:12Z 2018-05-10T16:00:12Z MEMBER

@raybellwaves thanks for the bug report!

Here's a slightly simplified version that shows the issue for dask: ``` import pandas as pd import xarray as xr import numpy as np

da_day_clim = xr.DataArray(np.arange(1, 367), coords=[np.arange(1, 367)], dims='dayofyear') print(da_day_clim.rolling(dayofyear=31, center=True).mean()) # works print(da_day_clim.chunk().rolling(dayofyear=31, center=True).mean()) # raises ValueError ```

The traceback is probably the place to start looking into this. I like to drop into a Python debugger (type %debug after the line that raised the error), navigate to different levels in the traceback with u/d, and then print out variables until I can identify which specific function/block of code seems to be doing the wrong thing.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rolling mean of dask array conflicting sizes for data and coordinate in rolling operation 321917084
388042273 https://github.com/pydata/xarray/issues/2113#issuecomment-388042273 https://api.github.com/repos/pydata/xarray/issues/2113 MDEyOklzc3VlQ29tbWVudDM4ODA0MjI3Mw== raybellwaves 17162724 2018-05-10T12:43:18Z 2018-05-10T12:43:18Z CONTRIBUTOR

Probably isn't a good first issue but I wouldn't like to spend some time on this. Welcome to suggest places to look and things to try.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rolling mean of dask array conflicting sizes for data and coordinate in rolling operation 321917084

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 14.345ms · About: xarray-datasette