home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 1321228754 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 5

  • dcherian 2
  • jakirkham 1
  • Illviljan 1
  • keewis 1
  • TomNicholas 1

author_association 2

  • MEMBER 5
  • NONE 1

issue 1

  • Do we need to update AbstractArray for duck arrays? · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1199776154 https://github.com/pydata/xarray/issues/6845#issuecomment-1199776154 https://api.github.com/repos/pydata/xarray/issues/6845 IC_kwDOAMm_X85HgyGa dcherian 2448579 2022-07-29T17:20:39Z 2022-07-29T17:20:39Z MEMBER

My understanding is that if array_function is working correctly you should never need to call cupy.round on your dataarray. Instead you should always be able to call np.round and trust that the array_function implementation will dispatch to cupy's equivalent of round automatically.

:+1: Question is whether we are expected to also make cp.round work.

Is there actually a case where we need the library-specific version of a numpy function to work too?

Someone's going to try it =) . At least we should document what's expected.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Do we need to update AbstractArray for duck arrays? 1321228754
1198923887 https://github.com/pydata/xarray/issues/6845#issuecomment-1198923887 https://api.github.com/repos/pydata/xarray/issues/6845 IC_kwDOAMm_X85HdiBv TomNicholas 35968931 2022-07-29T06:23:59Z 2022-07-29T06:23:59Z MEMBER

My understanding is that if __array_function__ is working correctly you should never need to call cupy.round on your dataarray. Instead you should always be able to call np.round and trust that the __array_function__ implementation will dispatch to cupy's equivalent of round automatically.

Is there actually a case where we need the library-specific version of a numpy function to work too?

Do we need to update AbstractArray.array to return the underlying duck array instead of always a numpy array?

(Having said all that we might still want to make this change anyway, this was just an argument for the current behaviour being "good enough".)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Do we need to update AbstractArray for duck arrays? 1321228754
1198655444 https://github.com/pydata/xarray/issues/6845#issuecomment-1198655444 https://api.github.com/repos/pydata/xarray/issues/6845 IC_kwDOAMm_X85HcgfU jakirkham 3019665 2022-07-28T21:33:03Z 2022-07-28T21:33:03Z NONE

Probably out of my depth here (so please forgive me), but one thing that might be worth looking at is Array API support, which CuPy 10+ supports and Dask is working on support for ( https://github.com/dask/dask/pull/8750 ). Believe XArray is taking some initial steps in this direction recently ( https://github.com/pydata/xarray/pull/6804 ), but could easily be misunderstanding the scope/intended usage of the changes there.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Do we need to update AbstractArray for duck arrays? 1321228754
1198619506 https://github.com/pydata/xarray/issues/6845#issuecomment-1198619506 https://api.github.com/repos/pydata/xarray/issues/6845 IC_kwDOAMm_X85HcXty dcherian 2448579 2022-07-28T20:51:18Z 2022-07-28T20:51:18Z MEMBER

cupy.round is not supposed to be called on anything other than cupy (or numpy.ndarray

Yeah I'm not sure what the expectation is but I was calling cp.round on a DataArray that wrapped a cupy array. Which is why the __array__ triggered an error. I'll update the first post to clarify.

my impression of array is that it should only be used to convert custom objects to np.ndarray (usually using np.array or np.asarray)

OK that would suggest that the current behaviour is correct

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Do we need to update AbstractArray for duck arrays? 1321228754
1198617790 https://github.com/pydata/xarray/issues/6845#issuecomment-1198617790 https://api.github.com/repos/pydata/xarray/issues/6845 IC_kwDOAMm_X85HcXS- keewis 14808389 2022-07-28T20:49:07Z 2022-07-28T20:49:07Z MEMBER

Not sure, but maybe cupy.round is not supposed to be called on anything other than cupy (or numpy.ndarray)? If I understand correctly, it is converting everything to cupy (or numpy) using _core.array before actually doing the computation.

Also, my impression of __array__ is that it should only be used to convert custom objects to np.ndarray (usually using np.array or np.asarray)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Do we need to update AbstractArray for duck arrays? 1321228754
1198596866 https://github.com/pydata/xarray/issues/6845#issuecomment-1198596866 https://api.github.com/repos/pydata/xarray/issues/6845 IC_kwDOAMm_X85HcSMC Illviljan 14371165 2022-07-28T20:25:08Z 2022-07-28T20:25:08Z MEMBER

I believe so. The other ones that uses .values will fail as well with sparse.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Do we need to update AbstractArray for duck arrays? 1321228754

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