home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "MEMBER" and issue = 325810810 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 1
  • jhamman 1

issue 1

  • Advice on unit-aware arithmetic · 2 ✖

author_association 1

  • MEMBER · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
391481382 https://github.com/pydata/xarray/issues/2176#issuecomment-391481382 https://api.github.com/repos/pydata/xarray/issues/2176 MDEyOklzc3VlQ29tbWVudDM5MTQ4MTM4Mg== shoyer 1217238 2018-05-23T20:14:26Z 2018-05-23T20:14:26Z MEMBER

If you implement arithmetic special methods like __add__ and __radd__ on your accessor, you could write things like: dt = DataArray(timestep.total_seconds(), attrs={'units': 's'}) for key in tendencies_list[0].keys(): return_state[key] = state[key].sympl + dt.sympl * ( 1.5 * tendencies_list[-1][key].sympl - 0.5 * tendencies_list[-2][key].sympl ) It's awkward but you can still use the infix notation.

Subclassing or writing a DataArray wrapper like what @kmpaul did in physarrays seems like the cleanest way to do this currently. The main challenge is to avoid relying on non-public parts of the DataArray API, but I think overwriting arithmetic would be pretty safe.

In the long term, I think the best solution here is probably an extensible interface for data in xarray objects that would let you put an array with units into an xarray object, similar to the hooks we want for sparse arrays (https://github.com/pydata/xarray/issues/1938).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Advice on unit-aware arithmetic 325810810
391441974 https://github.com/pydata/xarray/issues/2176#issuecomment-391441974 https://api.github.com/repos/pydata/xarray/issues/2176 MDEyOklzc3VlQ29tbWVudDM5MTQ0MTk3NA== jhamman 2443309 2018-05-23T17:59:32Z 2018-05-23T17:59:32Z MEMBER

cc @KMPaul who has also been working on this sort of thing recently.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Advice on unit-aware arithmetic 325810810

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