home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 83000406 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

  • shoyer 3
  • jhamman 2

issue 1

  • unexpected positional indexing behavior with Dataset and DataArray "isel" · 5 ✖

author_association 1

  • MEMBER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
107307140 https://github.com/pydata/xarray/issues/411#issuecomment-107307140 https://api.github.com/repos/pydata/xarray/issues/411 MDEyOklzc3VlQ29tbWVudDEwNzMwNzE0MA== jhamman 2443309 2015-06-01T05:03:29Z 2015-06-01T05:03:38Z MEMBER

Thanks @shoyer . I think #412 suffices for this issue.

I will touch base regarding some point-wise/intersection/diagonal indexing (#214) when I return in July.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  unexpected positional indexing behavior with Dataset and DataArray "isel" 83000406
107255997 https://github.com/pydata/xarray/issues/411#issuecomment-107255997 https://api.github.com/repos/pydata/xarray/issues/411 MDEyOklzc3VlQ29tbWVudDEwNzI1NTk5Nw== shoyer 1217238 2015-05-31T23:14:01Z 2015-05-31T23:14:01Z MEMBER

Added a warning in https://github.com/xray/xray/pull/412. Here's what that doc page looks like now:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  unexpected positional indexing behavior with Dataset and DataArray "isel" 83000406
107251624 https://github.com/pydata/xarray/issues/411#issuecomment-107251624 https://api.github.com/repos/pydata/xarray/issues/411 MDEyOklzc3VlQ29tbWVudDEwNzI1MTYyNA== shoyer 1217238 2015-05-31T22:03:15Z 2015-05-31T22:03:15Z MEMBER

The indexing details link you show does explain the behavior better but it is somewhat contradictory to the quote I listed above. I think it would be worth reconciling the docs on that point.

I'll definitely add a note to qualify that description in the docs -- sorry you went to all the trouble of writing up the bug report!

The station selection use case you bring up is exactly what I was going for. It would be nice if we could stay in xray / pandas after the indexing. Ideally, I don't want to do: xr_data.values[:, ys, xs] and then recreate a DataArray.

The open issue for this is #214, which describes how I currently do "diagonal" style indexing to extract stations. It preserves all the metadata, but is a little slow if you have a very long list of stations:.

Note that the example in that first comment will work even with arrays that don't fit into memory if you use dask (which will be in the next xray release, which will be out today or tomorrow).

Lastly, is there an issue open for support of numpy fancy indexing?

Full NumPy style fancy indexing is out of scope for xray. You can simply do way too many complex things with it for which preserving the metadata is impossible (e.g., you can scramble the elements of a 2D array into any arbitrary desired positions). Moreover, the underlying array indexing operations are only possible to do efficiently if the underlying array is backed by NumPy -- there's no way we'll do that with netCDF4 or dask.array. But more limited cases, such as the "diagonal" or intersection style array indexing you want here are definitely possible to support, and help for that would certainly be appreciated.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  unexpected positional indexing behavior with Dataset and DataArray "isel" 83000406
107210623 https://github.com/pydata/xarray/issues/411#issuecomment-107210623 https://api.github.com/repos/pydata/xarray/issues/411 MDEyOklzc3VlQ29tbWVudDEwNzIxMDYyMw== jhamman 2443309 2015-05-31T15:45:49Z 2015-05-31T15:45:49Z MEMBER

Okay. Glad to hear I was missing something. For large datasets, I was getting a MemoryError with orthogonal indexing as the array size increased like it did in my example.

The indexing details link you show does explain the behavior better but it is somewhat contradictory to the quote I listed above. I think it would be worth reconciling the docs on that point.

The station selection use case you bring up is exactly what I was going for. It would be nice if we could stay in xray / pandas after the indexing. Ideally, I don't want to do: xr_data.values[:, ys, xs] and then recreate a DataArray.

Lastly, is there an issue open for support of numpy fancy indexing? This is something that would be useful for my work and I could contribute to the effort beginning in July.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  unexpected positional indexing behavior with Dataset and DataArray "isel" 83000406
107141480 https://github.com/pydata/xarray/issues/411#issuecomment-107141480 https://api.github.com/repos/pydata/xarray/issues/411 MDEyOklzc3VlQ29tbWVudDEwNzE0MTQ4MA== shoyer 1217238 2015-05-31T07:46:38Z 2015-05-31T07:46:38Z MEMBER

This is expected -- we do orthogonal indexing (treating each coordinate independently), not NumPy style fancy indexing. If you read on in the indexing docs, you'll find this under "Indexing details": http://xray.readthedocs.org/en/latest/indexing.html#indexing-details

Perhaps we should note this more prominently!

The style of indexing you're describing here is definitely useful, though (e.g., for selecting the locations of stations from a grid) -- it's something that I would really like to support.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  unexpected positional indexing behavior with Dataset and DataArray "isel" 83000406

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