home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 851581057

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/3232#issuecomment-851581057 https://api.github.com/repos/pydata/xarray/issues/3232 851581057 MDEyOklzc3VlQ29tbWVudDg1MTU4MTA1Nw== 14808389 2021-05-31T16:12:35Z 2021-06-01T20:01:07Z MEMBER

changing the xarray internals is not too much work: we need to get xarray.core.utils.is_duck_array to return true if the object has either __array_namespace__ or __array_ufunc__ and __array_function__ (or all three) defined, and we'd need a short test demonstrating that objects that implement only __array_namespace__ survive unchanged when wrapped by a xarray object (i.e. something like isinstance(xr.DataArray(pytorch_object).mean().data, pytorch.Tensor)).

We might still be a bit too early with this, though: the PR which adds __array_namespace__ to numpy has not been merged into numpy:main yet.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  482543307
Powered by Datasette · Queries took 0.852ms · About: xarray-datasette