home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 524568112

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/525#issuecomment-524568112 https://api.github.com/repos/pydata/xarray/issues/525 524568112 MDEyOklzc3VlQ29tbWVudDUyNDU2ODExMg== 3460034 2019-08-24T17:34:31Z 2019-08-24T17:34:31Z CONTRIBUTOR

@shoyer Thank you for the reply!

That sounds good about the repr custom logic.

With the units attribute, I was presuming based on the past comments that DataArray.units would be a new property; I forgot that DataArray.<attrname> passes along to DataArray.attrs.<attrname>, so that implementing something new for DataArray.units would be a breaking change! In trying to avoid such a change, though, I think it would be confusing to have a DataArray-level DataArray.units_convert method and not a corresponding DataArray-level way of getting at the units. So, would it be okay to just implement this unit interface (unit access, unit conversion, and IO) through an accessor, and start out with just a pint accessor? If so, where should it be implemented?

Possible ideas I had:

  • As a boilerplate example in the xarray documentation that downstream libraries or end-users can implement?
  • In xarray itself?
  • In pint or a new pint-adjacent package (similar to pint-pandas)?
  • A new xarray-adjacent package for general-purpose unit compatibility?
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  100295585
Powered by Datasette · Queries took 0.603ms · About: xarray-datasette