home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 282063849

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/988#issuecomment-282063849 https://api.github.com/repos/pydata/xarray/issues/988 282063849 MDEyOklzc3VlQ29tbWVudDI4MjA2Mzg0OQ== 500246 2017-02-23T17:37:18Z 2017-02-23T17:37:18Z CONTRIBUTOR

I would say using the units attribute is the most natural way to go. It could be optional and then built on top of pint, which would make it rather easy to implement:

```

ureg is a pint unit registry

y = a/b y.attrs["units"] = ureg(a.attrs["units"]) / ureg(b.attrs["units"]) ```

which if I understand the codebase correctly could be added to DataArray._binary_op. Not sure if it is similarly easy for ufuncs, is that what __numpy_ufunc__ would be for?

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