home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 302153432 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

  • dopplershift 3
  • shoyer 3

author_association 2

  • CONTRIBUTOR 3
  • MEMBER 3

issue 1

  • Support __array_ufunc__ for xarray objects. · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
371681303 https://github.com/pydata/xarray/pull/1962#issuecomment-371681303 https://api.github.com/repos/pydata/xarray/issues/1962 MDEyOklzc3VlQ29tbWVudDM3MTY4MTMwMw== dopplershift 221526 2018-03-09T01:20:03Z 2018-03-09T01:20:03Z CONTRIBUTOR

Right. But such hooks would be sufficient to properly maintain the units attribute on a DataArray and check whether math made sense. This could use pint under the covers.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support __array_ufunc__ for xarray objects. 302153432
371680749 https://github.com/pydata/xarray/pull/1962#issuecomment-371680749 https://api.github.com/repos/pydata/xarray/issues/1962 MDEyOklzc3VlQ29tbWVudDM3MTY4MDc0OQ== shoyer 1217238 2018-03-09T01:16:42Z 2018-03-09T01:16:42Z MEMBER

If you try to put a pint array into xarray.DataArray right now, I'm pretty sure it will get cast into a NumPy array.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support __array_ufunc__ for xarray objects. 302153432
371680160 https://github.com/pydata/xarray/pull/1962#issuecomment-371680160 https://api.github.com/repos/pydata/xarray/issues/1962 MDEyOklzc3VlQ29tbWVudDM3MTY4MDE2MA== dopplershift 221526 2018-03-09T01:13:16Z 2018-03-09T01:13:16Z CONTRIBUTOR

At this point I'd be happy to have hooks that let me intercept/wrap ufunc operations, though I guess that's what #1938 is supporting in a more systematic way.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support __array_ufunc__ for xarray objects. 302153432
371658417 https://github.com/pydata/xarray/pull/1962#issuecomment-371658417 https://api.github.com/repos/pydata/xarray/issues/1962 MDEyOklzc3VlQ29tbWVudDM3MTY1ODQxNw== shoyer 1217238 2018-03-08T23:17:52Z 2018-03-08T23:17:52Z MEMBER

@dopplershift see https://github.com/pydata/xarray/issues/1938. Units should be able to make use of the same machinery as sparse arrays (__array_ufunc__ and multipledispatch), but xarray itself implementing __array_ufunc__ is not particularly useful, because you still can't put your own custom array types inside xarray objects.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support __array_ufunc__ for xarray objects. 302153432
371650629 https://github.com/pydata/xarray/pull/1962#issuecomment-371650629 https://api.github.com/repos/pydata/xarray/issues/1962 MDEyOklzc3VlQ29tbWVudDM3MTY1MDYyOQ== dopplershift 221526 2018-03-08T22:43:26Z 2018-03-08T22:43:26Z CONTRIBUTOR

This looks awesome. Thoughts on where you think units fits in here?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support __array_ufunc__ for xarray objects. 302153432
371355899 https://github.com/pydata/xarray/pull/1962#issuecomment-371355899 https://api.github.com/repos/pydata/xarray/issues/1962 MDEyOklzc3VlQ29tbWVudDM3MTM1NTg5OQ== shoyer 1217238 2018-03-08T02:20:21Z 2018-03-08T02:20:21Z MEMBER

One potential edge case is if someone directly calls a ufunc reduce method, e.g., np.add.reduce. Previously, this would cast the xarray object to a numpy array, but now it will raise an error.

Example: ```

current xarray

In [3]: np.add.reduce(xr.DataArray([1])) Out[3]: 1

with this pull request

In [3]: np.add.reduce(xr.DataArray(0)) NotImplementedError: reduce method for ufunc <ufunc 'add'> is not implemented on xarray objects, which currently only support the call method. ```

Note that the more commonly used aliases for these reduce methods, e.g., np.sum() will continue to work since they check for sum() method on their argument.

There are also a few other ufunc methods that get used occasionally.

I think I'm OK breaking these because usage is so rare (and the work-around of casting to numpy arrays is so easy) but this should probably be noted in the release notes.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support __array_ufunc__ for xarray objects. 302153432

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