home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 753406775

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-753406775 https://api.github.com/repos/pydata/xarray/issues/4746 753406775 MDEyOklzc3VlQ29tbWVudDc1MzQwNjc3NQ== 5635139 2021-01-02T00:03:00Z 2021-01-02T00:03:00Z MEMBER

Would anyone be able be familiar with this pint error? https://dev.azure.com/xarray/xarray/_build/results?buildId=4650&view=ms.vss-test-web.build-test-results-tab&runId=73654&resultId=111454&paneView=debug

It seems to be failing on the assignment: data[(..., *indexer)] = reordered, rather than anything specific to unstacking.

Here's the stack trace from there:

```python /home/vsts/work/1/s/xarray/core/variable.py:1627: in _unstack_once data[(..., *indexer)] = reordered /home/vsts/work/1/s/xarray/core/common.py:131: in array return np.asarray(self.values, dtype=dtype) /home/vsts/work/1/s/xarray/core/variable.py:543: in values return _as_array_or_item(self._data) /home/vsts/work/1/s/xarray/core/variable.py:275: in _as_array_or_item data = np.asarray(data) /usr/share/miniconda/envs/xarray-tests/lib/python3.8/site-packages/numpy/core/_asarray.py:83: in asarray return array(a, dtype, copy=False, order=order)


self = <Quantity([ 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 6 6 6 6 6 7 7 7 7 7 8 8 8 8 8 9 9 9 9 10], 'meter')> t = None

def __array__(self, t=None):
  warnings.warn(
        "The unit of the quantity is stripped when downcasting to ndarray.",
        UnitStrippedWarning,
        stacklevel=2,
    )

E pint.errors.UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.

/usr/share/miniconda/envs/xarray-tests/lib/python3.8/site-packages/pint/quantity.py:1683: UnitStrippedWarning ```

Worst case, I can direct pint arrays to the existing unstack path, but ideally this would work.

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