home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 514191264 and user = 6213168 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 1

  • crusaderky · 3 ✖

issue 1

  • Poor error message on Dataset.sum(axis=...) · 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
547620729 https://github.com/pydata/xarray/issues/3461#issuecomment-547620729 https://api.github.com/repos/pydata/xarray/issues/3461 MDEyOklzc3VlQ29tbWVudDU0NzYyMDcyOQ== crusaderky 6213168 2019-10-29T20:43:34Z 2019-10-29T20:43:34Z MEMBER

I think there's space here to make xarray more user friendly. A better error message would particularly be useful with new xarray users which are used to numpy and pandas - which is the most common new user profile TBH.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Poor error message on Dataset.sum(axis=...) 514191264
547614151 https://github.com/pydata/xarray/issues/3461#issuecomment-547614151 https://api.github.com/repos/pydata/xarray/issues/3461 MDEyOklzc3VlQ29tbWVudDU0NzYxNDE1MQ== crusaderky 6213168 2019-10-29T20:27:14Z 2019-10-29T20:33:27Z MEMBER

@rpgoldman if you want to do an elementwise sum of the data_vars of a Dataset, it's as simple as sum(ds.data_vars.values()). Dataset.sum() is not elementwise - it's a reduction along one or more axes - exactly like in numpy.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Poor error message on Dataset.sum(axis=...) 514191264
547613150 https://github.com/pydata/xarray/issues/3461#issuecomment-547613150 https://api.github.com/repos/pydata/xarray/issues/3461 MDEyOklzc3VlQ29tbWVudDU0NzYxMzE1MA== crusaderky 6213168 2019-10-29T20:24:50Z 2019-10-29T20:24:50Z MEMBER

It's a case of improper error message.

I don't think anybody ever thought of passing the axis parameter to any of the Dataset methods before. As a general rule, it would be a very unwise idea unless you're sure that all of your data_vars have the required dimension exactly in the same position.

Note the documentation for Dataset.sum vs. DataArray.sum:

http://xarray.pydata.org/en/stable/generated/xarray.Dataset.sum.html http://xarray.pydata.org/en/stable/generated/xarray.DataArray.sum.html

You were able to pass the axis parameter because Dataset.sum accepts **kwargs, which are intended for backend-specific arguments (e.g. dask's split_every parameter).

The solution is to blacklist a bunch of numpy arguments that don't make sense (axis is one, but out also comes to mind).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Poor error message on Dataset.sum(axis=...) 514191264

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