home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 524568953

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-524568953 https://api.github.com/repos/pydata/xarray/issues/525 524568953 MDEyOklzc3VlQ29tbWVudDUyNDU2ODk1Mw== 1217238 2019-08-24T17:47:22Z 2019-08-24T17:47:22Z MEMBER

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!

I think the new property is still an option, even if we want to preserve accessing "units" from attrs, e.g., python @property def units(self): if hasattr(self.data, 'units'): # data is an array with units return self.data.units elif 'units' in self.attrs: # consider issuing a FutureWarning here? return self.attrs['units'] else: raise AttributeError('units')

{
    "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 13.505ms · About: xarray-datasette