home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 753423841

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/4746#issuecomment-753423841 https://api.github.com/repos/pydata/xarray/issues/4746 753423841 MDEyOklzc3VlQ29tbWVudDc1MzQyMzg0MQ== 3460034 2021-01-02T03:15:56Z 2021-01-02T03:15:56Z CONTRIBUTOR

@max-sixty That error seems to be arising because data is an numpy.ndarray and reordered is an xarray.Variable with a pint.Quantity inside, hence trying to assign a unit-aware array to an ndarray causes the units to be stripped.

Perhaps relevant to the discussion is this Pint issue https://github.com/hgrecco/pint/issues/882 where it was tentatively decided that Pint's wrapped implementation of np.full_like would base its units off of fill_value alone, so as it is now, I think _unstack_once would need to create a Quantity-wrapped nan in the units of self.data for Pint to create an Quantity filled with nans (if I'm interpreting the implementation here correctly and that is what is needed). This seems like something where units-on-the-dtype would be useful, but alas, things aren't there yet!

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