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/3643#issuecomment-610159680,https://api.github.com/repos/pydata/xarray/issues/3643,610159680,MDEyOklzc3VlQ29tbWVudDYxMDE1OTY4MA==,3460034,2020-04-07T03:58:05Z,2020-04-07T03:58:05Z,CONTRIBUTOR,"Also, after glancing through all this, it seems like xarray is dealing inconsistently with the type casting hierarchy:
- Construction/wrapping allowing `__array_function__`-defining duck arrays among other explictly listed additions (pandas.Index, dask arrays, etc., see https://github.com/pydata/xarray/blob/9b5140e0711247c373987b56726282140b406d7f/xarray/core/variable.py#L166)
- Binary ops only denying based on xarray's internal hierarchy (Dataset, DataArray, Variable), otherwise deferring to underlying data
- `__array_ufunc__` allowing a list of supported types (https://github.com/pydata/xarray/blob/9b5140e0711247c373987b56726282140b406d7f/xarray/core/arithmetic.py#L24-L30 along with `SupportsArithmetic`)
- (`__array_function__` yet to be defined)
Should this be its own issue?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,539988974
https://github.com/pydata/xarray/pull/3643#issuecomment-610159608,https://api.github.com/repos/pydata/xarray/issues/3643,610159608,MDEyOklzc3VlQ29tbWVudDYxMDE1OTYwOA==,3460034,2020-04-07T03:57:45Z,2020-04-07T03:57:45Z,CONTRIBUTOR,@keewis Is part of the specific problem that Pint has a guarded import of xarray when defining its upcast types? Would it help if it checked for the fully qualified class name instead?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,539988974
https://github.com/pydata/xarray/pull/3643#issuecomment-569166918,https://api.github.com/repos/pydata/xarray/issues/3643,569166918,MDEyOklzc3VlQ29tbWVudDU2OTE2NjkxOA==,3460034,2019-12-27T02:09:45Z,2019-12-27T02:09:45Z,CONTRIBUTOR,"> @jthielen, it looks like this needs `numpy.pad` and `numpy.resize` in `pint`. I tried to implement it myself, but while `numpy.resize` is easy (add an entry to the `implement_consistent_units_by_argument` loop), that is not the case for `numpy.pad`. Regardless of whether my proposed fixes are actually the best way, `numpy.pad` is used in other places of the code base so we'd probably need both, anyway. What do you think?
No problem at all to add these! See https://github.com/hgrecco/pint/pull/956.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,539988974