home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

11 rows where author_association = "MEMBER" and issue = 275744315 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 5

  • rabernat 4
  • shoyer 3
  • fujiisoup 2
  • jhamman 1
  • fmaussion 1

issue 1

  • IndexError when printing dataset from an Argo file · 11 ✖

author_association 1

  • MEMBER · 11 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
346962014 https://github.com/pydata/xarray/issues/1732#issuecomment-346962014 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0Njk2MjAxNA== shoyer 1217238 2017-11-25T19:49:20Z 2017-11-25T19:49:20Z MEMBER

Marking this as closed since the issue will be fixed in the next netcdf4-python release. Feel free to submit a PR with a work around for xarray if using the scipy backend is not a good alternative for you.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346170883 https://github.com/pydata/xarray/issues/1732#issuecomment-346170883 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjE3MDg4Mw== shoyer 1217238 2017-11-21T21:43:45Z 2017-11-21T21:43:45Z MEMBER

This is pretty clearly a netCDF4-Python bug, which I have reported upstream: https://github.com/Unidata/netcdf4-python/issues/743

If desired, we probably could pretty easily add a work around for this behavior (e.g., to create an empty numpy array of the appropriate shape) to our netCDF4-python wrapper: https://github.com/pydata/xarray/blob/9d09c1659741dafb1fadeed49c81f9e90a548b07/xarray/backends/netCDF4_.py#L50

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346124602 https://github.com/pydata/xarray/issues/1732#issuecomment-346124602 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjEyNDYwMg== shoyer 1217238 2017-11-21T18:51:41Z 2017-11-21T18:51:41Z MEMBER

This might be specific to string variables (character arrays) and netCDF4. My guess is that netCDF4 may not handle indexing on zero-dimensional arrays properly.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346116095 https://github.com/pydata/xarray/issues/1732#issuecomment-346116095 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjExNjA5NQ== fujiisoup 6815844 2017-11-21T18:21:03Z 2017-11-21T18:48:20Z MEMBER

Reproduced also in my environment.

Selected repr of your dataset is python <xarray.Dataset> Dimensions: (N_CALIB: 1, N_HISTORY: 0, N_LEVELS: 1007, N_PARAM: 3, N_PROF: 33) Dimensions without coordinates: N_CALIB, N_HISTORY, N_LEVELS, N_PARAM, N_PROF Data variables: ... SCIENTIFIC_CALIB_DATE (N_PROF, N_CALIB, N_PARAM) object b'20150514141619' ... HISTORY_INSTITUTION (N_HISTORY, N_PROF) object ... It seems the data variable in concern, such as ds['HISTORY_STEP'], is 2-dimensional but one of the dimensions N_HISTORY is size 0.

~~Currently, xarray does not handle such zero-length n-dimensional arrays. Maybe we need to drop such variables when reading?~~

EDIT: This was wrong. xarray should handle 0-size nd-array.

@shoyer, @fmaussion, any idea?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346123261 https://github.com/pydata/xarray/issues/1732#issuecomment-346123261 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjEyMzI2MQ== fujiisoup 6815844 2017-11-21T18:47:06Z 2017-11-21T18:47:06Z MEMBER

I tried with xarray v0.9.6 but it raises the same error. Maybe also related to #1719 .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346122251 https://github.com/pydata/xarray/issues/1732#issuecomment-346122251 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjEyMjI1MQ== fmaussion 10050469 2017-11-21T18:43:21Z 2017-11-21T18:43:28Z MEMBER

But is this really the issue? Because this works:

```python import numpy as np import xarray as xr

a = np.zeros((0, 2)) da = xr.DataArray(a) da.to_netcdf('test.nc')

xr.open_dataarray('test.nc') Out[16]: <xarray.DataArray (dim_0: 0, dim_1: 2)> array([], shape=(0, 2), dtype=float64) Dimensions without coordinates: dim_0, dim_1 ```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346120371 https://github.com/pydata/xarray/issues/1732#issuecomment-346120371 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjEyMDM3MQ== rabernat 1197350 2017-11-21T18:36:49Z 2017-11-21T18:36:49Z MEMBER

Currently, xarray does not handle such zero-length n-dimensional arrays. Maybe we need to drop such variables when reading?

Rather than drop a variable the user could read with no problem under xarray 0.9.6, I propose we examine our new indexing wrappers and figure out how to fix this bug.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346072873 https://github.com/pydata/xarray/issues/1732#issuecomment-346072873 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjA3Mjg3Mw== rabernat 1197350 2017-11-21T16:00:58Z 2017-11-21T16:00:58Z MEMBER

~It's good to see that the release-candidate process actually works!~ 😭

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 1,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346059225 https://github.com/pydata/xarray/issues/1732#issuecomment-346059225 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjA1OTIyNQ== rabernat 1197350 2017-11-21T15:20:21Z 2017-11-21T15:20:21Z MEMBER

It's good to see that the release-candidate process actually works! 😉

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346056932 https://github.com/pydata/xarray/issues/1732#issuecomment-346056932 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjA1NjkzMg== jhamman 2443309 2017-11-21T15:13:45Z 2017-11-21T15:13:45Z MEMBER

Yes, please upgrade to 0.10.0 and report back. I cannot reproduce your issue with this release version.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315
346056557 https://github.com/pydata/xarray/issues/1732#issuecomment-346056557 https://api.github.com/repos/pydata/xarray/issues/1732 MDEyOklzc3VlQ29tbWVudDM0NjA1NjU1Nw== rabernat 1197350 2017-11-21T15:12:28Z 2017-11-21T15:12:38Z MEMBER

Guillaume--this is very troubling! I use xarray frequently on ARGO netCDF files. It would be a shame if we broke something related to reading them. It sounds like this could be related to the indexing changes in #1676.

Since rc1, xarray 0.10.0 has gone through another release candidate (rc2) and is now in full release. Can you try upgrading to the just-released 0.10.0 and verify whether the problem is still present?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  IndexError when printing dataset from an Argo file 275744315

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