home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "MEMBER" and issue = 28575097 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • shoyer 3

issue 1

  • Dataset.__delitem__() kills dimensions dictionary · 3 ✖

author_association 1

  • MEMBER · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
36970906 https://github.com/pydata/xarray/issues/32#issuecomment-36970906 https://api.github.com/repos/pydata/xarray/issues/32 MDEyOklzc3VlQ29tbWVudDM2OTcwOTA2 shoyer 1217238 2014-03-07T06:15:36Z 2014-03-07T06:15:36Z MEMBER

Closing this issue since it was resolved by #34 (now merged into master).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset.__delitem__() kills dimensions dictionary 28575097
36469527 https://github.com/pydata/xarray/issues/32#issuecomment-36469527 https://api.github.com/repos/pydata/xarray/issues/32 MDEyOklzc3VlQ29tbWVudDM2NDY5NTI3 shoyer 1217238 2014-03-02T22:23:08Z 2014-03-03T02:23:19Z MEMBER

OK, I just added squeeze back in PR #34.

One change I made from in indexed_by from views is that it automatically squeezes out dimensions if you give an integer as the indexer. So fcst.indexed_by(height_above_ground=0) removes the height_above_ground dimension. If you wanted to keep that dimension with size 1, you would need to do fcst.indexed_by(height_above_ground=slice(0, 1)) or fcst.indexed_by(height_above_ground=[0]). This behavior is more consistent with numpy, especially because I use indexed_by under the hood for indexing with DatasetArray objects.

Your suggestion for __delitem__ is interesting but with the current implementation of squeeze (and indexed_by more generally) I'm not sure how to make it work, because we currently have to load a variable into memory as a numpy array to squeeze out a dimension. This means that deleting a variable could cause other variables to be loaded. My expectation (in general) is that deleting an item should only release resources, and do so in a fairly lightweight fashion.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset.__delitem__() kills dimensions dictionary 28575097
36462034 https://github.com/pydata/xarray/issues/32#issuecomment-36462034 https://api.github.com/repos/pydata/xarray/issues/32 MDEyOklzc3VlQ29tbWVudDM2NDYyMDM0 shoyer 1217238 2014-03-02T18:37:38Z 2014-03-02T18:37:38Z MEMBER

I removed Dataset.squeeze because I've never actually had a use-case for np.squeeze. But it would be very easy to bring it back if you find it genuinely useful. The equivalent in the current version of xray would be fcst.indexed_by(height_above_ground=0), which would select out (a view) of the 0th element along the forecast dimension.

__delitem__ is intended to remove a variable from a dataset but I have not tested it very carefully. Since every dimension is a variable, I think the right behavior would be to delete every variable that uses the dimension. So the later behavior you found is definitely not right! I'll see if I can put in a fix for that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset.__delitem__() kills dimensions dictionary 28575097

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