home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 524099935

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/3238#issuecomment-524099935 https://api.github.com/repos/pydata/xarray/issues/3238 524099935 MDEyOklzc3VlQ29tbWVudDUyNDA5OTkzNQ== 3460034 2019-08-22T22:20:49Z 2019-08-22T22:20:49Z CONTRIBUTOR

I noticed you have @pytest.mark.filterwarnings("error::pint.errors.UnitStrippedWarning"), which I believe is what is raising that warning to the error level. What happens when you remove that?

As to why the warning is happening in the first place, I think that is because the __array_function__ implementation in pint right now only exists in a PR. So, when xarray looks for an __array_function__ attribute on the pint Quantity right now, it falls back to this:

https://github.com/hgrecco/pint/blob/2afdc4bf5c5727ed9cef6fdaccb00b88813c4a24/pint/quantity.py#L1438-L1449

Hence, the UnitStrippedWarning. However, hasattr(data, "__array_function__") should still work, albeit for the wrong reason since pint doesn't yet have a true __array_function__ method.

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