home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • mraspaud 2
  • keewis 2
  • dcherian 1

author_association 2

  • MEMBER 3
  • CONTRIBUTOR 2

issue 1

  • dataarray arithmetics restore removed coordinates in xarray 0.15 · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
581972445 https://github.com/pydata/xarray/issues/3746#issuecomment-581972445 https://api.github.com/repos/pydata/xarray/issues/3746 MDEyOklzc3VlQ29tbWVudDU4MTk3MjQ0NQ== dcherian 2448579 2020-02-04T15:45:55Z 2020-02-04T15:45:55Z MEMBER

IMO we should fix to remove associated indexes and issue a patch release.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  dataarray arithmetics restore removed coordinates in xarray 0.15 559645981
581940682 https://github.com/pydata/xarray/issues/3746#issuecomment-581940682 https://api.github.com/repos/pydata/xarray/issues/3746 MDEyOklzc3VlQ29tbWVudDU4MTk0MDY4Mg== mraspaud 167802 2020-02-04T14:40:09Z 2020-02-04T14:40:09Z CONTRIBUTOR

Thanks for the clarification. I can confirm that drop_vars works as expected. As a user, I would vote for having __delitem__ call drop_vars, at least for now to keep backwards compatibility ?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  dataarray arithmetics restore removed coordinates in xarray 0.15 559645981
581914938 https://github.com/pydata/xarray/issues/3746#issuecomment-581914938 https://api.github.com/repos/pydata/xarray/issues/3746 MDEyOklzc3VlQ29tbWVudDU4MTkxNDkzOA== keewis 14808389 2020-02-04T13:42:41Z 2020-02-04T14:31:23Z MEMBER

the issue here is that if you call __delitem__ on DataArray.coords (which returns a dict-like object named DataArrayCoordinates), it deletes the coordinates, but leaves the indexes intact: python In [13]: arr1_ = arr1.copy() ...: del arr1_.coords["x"] ...: del arr1_.coords["y"] ...: arr1_.coords, arr1_.indexes Out[13]: (Coordinates: *empty*, y: Int64Index([0, 1], dtype='int64', name='y') x: Int64Index([0, 1], dtype='int64', name='x'))

Since #3481 the indexes are passed along in binary operations (such as multiplication) and will thus cause the coordinates reappear. Note that coordinates without indexes (non-dimension coordinates) will be removed properly.

If we want to support this way of dropping coordinates we should update the indexes, explicitly or via drop_vars, otherwise we might want to make *Coordinates objects read-only.

For now the easiest way to properly remove coordinates is by using drop_vars.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  dataarray arithmetics restore removed coordinates in xarray 0.15 559645981
581936376 https://github.com/pydata/xarray/issues/3746#issuecomment-581936376 https://api.github.com/repos/pydata/xarray/issues/3746 MDEyOklzc3VlQ29tbWVudDU4MTkzNjM3Ng== keewis 14808389 2020-02-04T14:30:41Z 2020-02-04T14:30:41Z MEMBER

I don't know whether or not this was supposed to work. Since there is a explicit __delitem__, I'd say it was at some point and my question above is more along the lines of "should this still work?".

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  dataarray arithmetics restore removed coordinates in xarray 0.15 559645981
581925761 https://github.com/pydata/xarray/issues/3746#issuecomment-581925761 https://api.github.com/repos/pydata/xarray/issues/3746 MDEyOklzc3VlQ29tbWVudDU4MTkyNTc2MQ== mraspaud 167802 2020-02-04T14:08:03Z 2020-02-04T14:08:03Z CONTRIBUTOR

@keewis thanks for the quick reply. I wasn't aware the builtin del wasn't supposed to work here, I'll try with drop_vars instead.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  dataarray arithmetics restore removed coordinates in xarray 0.15 559645981

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