home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 315948443 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • shoyer 1
  • ExpHP 1
  • fujiisoup 1
  • stale[bot] 1

author_association 2

  • MEMBER 2
  • NONE 2

issue 1

  • A way to generate automatically-numbered coords · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
601543091 https://github.com/pydata/xarray/issues/2067#issuecomment-601543091 https://api.github.com/repos/pydata/xarray/issues/2067 MDEyOklzc3VlQ29tbWVudDYwMTU0MzA5MQ== stale[bot] 26384082 2020-03-20T05:24:25Z 2020-03-20T05:24:25Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  A way to generate automatically-numbered coords 315948443
382972351 https://github.com/pydata/xarray/issues/2067#issuecomment-382972351 https://api.github.com/repos/pydata/xarray/issues/2067 MDEyOklzc3VlQ29tbWVudDM4Mjk3MjM1MQ== fujiisoup 6815844 2018-04-20T04:31:30Z 2018-04-20T05:09:29Z MEMBER

I think this will share a similar API with the evenly spaced coordinate discussed in issue #1650.

I thought the possible API would be xr.Dataset({'foo': ('x', data)}, {'x': slice(None)}) where it will construct a evenly spaced coordinate. But I am not sure if we should add this API now or after #1650 is implemented.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  A way to generate automatically-numbered coords 315948443
382960446 https://github.com/pydata/xarray/issues/2067#issuecomment-382960446 https://api.github.com/repos/pydata/xarray/issues/2067 MDEyOklzc3VlQ29tbWVudDM4Mjk2MDQ0Ng== ExpHP 1411280 2018-04-20T03:24:29Z 2018-04-20T03:27:09Z NONE

My issue is not so much with the range but the len. If done during construction from numpy arrays, it might need to be range(data.shape[0]) or range(data.shape[1]) or etc. based on the layout of the data. If done after construction with assign_coords, both the name of the dataset and the name of the dimension need to be written twice. This all creates room for silly mistakes.

On the bright side, the mistakes are quickly caught when the code executes at runtime. On the other side, they can be entirely avoided.


Of course, xarray doesn't have to do this; a user concerned about making these mistakes can easily capture this usage pattern in a wrapper function around assign_coords:

python def assign_auto_coords(da, *dims): """Give each specified dimension of a DataArray or Dataset automatic coords from 0 to n-1.""" return da.assign_coords(**{dim: range(self.sizes[dim]) for dim in dims})

it's merely that first-class support during construction would be nice to have.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  A way to generate automatically-numbered coords 315948443
382931094 https://github.com/pydata/xarray/issues/2067#issuecomment-382931094 https://api.github.com/repos/pydata/xarray/issues/2067 MDEyOklzc3VlQ29tbWVudDM4MjkzMTA5NA== shoyer 1217238 2018-04-20T01:09:01Z 2018-04-20T01:09:01Z MEMBER

If I understand correctly, instead of writing xr.Dataset({'foo': ('x', data)}, {'x': range(len(data))}), you want to be able to write something like xr.Dataset({'foo': ('x', data)}, {'x': xr.AUTO_NUMBER})?

I agree that it's sometimes convenient to automatically get coordinates 0 to n-1, but using range() is also pretty convenient, so I'm not sure we really need this shortcut.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  A way to generate automatically-numbered coords 315948443

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