home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 578143916

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/pull/3706#issuecomment-578143916 https://api.github.com/repos/pydata/xarray/issues/3706 578143916 MDEyOklzc3VlQ29tbWVudDU3ODE0MzkxNg== 14808389 2020-01-24T14:07:08Z 2020-01-24T14:07:08Z MEMBER

I think a separate units_equiv function may be cleaner?

I agree. However, I'm reluctant to add that function since that would be the first pint dependent code we have except from the unit tests (but do tell me if that's not an issue).

I'm inclined to provide some kind of hook for wrapped libraries instead (allow them to define a method like metadata_identical or something that does the check for us) so the code in identical would become something like ```python def metadata_identical(arr1, arr2): if hasattr(arr1, "metadata_identical"): return arr1.metadata_identical(arr2) elif hasattr(arr2, "metadata_identical"): return arr2.metadata_identical(arr1) else: return True

return ( self.dims == other.dims and (self._data is other._data or equiv(self.data, other.data)) and metadata_identical(self.data, other.data) ) ```

Note that we explicitly use lazy_array_equiv in concat so it'd be nice to have something that could be easily used there too

I don't think that's a problem since what calls lazy_array_equiv is Variable.identical and if identical works correctly this should, too.

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