issues: 324032926
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
324032926 | MDU6SXNzdWUzMjQwMzI5MjY= | 2148 | groupby beahaviour w.r.t. non principal coordinates | 35919497 | closed | 0 | 4 | 2018-05-17T13:52:43Z | 2020-12-17T11:47:47Z | 2020-12-17T11:47:47Z | COLLABORATOR | Code Sample```python import numpy as np import xarray as xr arr = xr.DataArray( np.ones(5), dims=('x',), coords={ 'x': ('x', np.array([1, 1, 1, 2, 2])), 'x2': ('x', np.array([1, 2, 3, 4, 5])), } ) arr <xarray.DataArray (x: 5)> array([1., 1., 1., 1., 1.]) Coordinates: * x (x) int64 1 1 1 2 2 x2 (x) int64 1 2 3 4 5 out = arr.groupby('x').mean('x') out <xarray.DataArray (x: 2)> array([1., 1.]) Coordinates: * x (x) int64 1 2 x2 (x) int64 1 2 3 4 5 ``` Problem descriptionInconsistency between: - the shape dimension x: (2,) - the shape of the coordinates x2 depending on the dimension x: (5,) Expected OutputThe coordinate x2 should be dropped.
Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2148/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |