issues: 324121124
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 324121124 | MDU6SXNzdWUzMjQxMjExMjQ= | 2153 | Bug: side effect on method GroupBy.first | 35919497 | closed | 0 | 1 | 2018-05-17T17:43:25Z | 2018-05-29T03:15:08Z | 2018-05-29T03:15:08Z | COLLABORATOR | Code Sample, a copy-pastable example if possible```python arr = xr.DataArray( np.arange(5), dims=('x',), coords={ 'x': ('x', np.array([1, 1, 1, 2, 2])), } ) gr = arr.groupby('x') gr.first() arr <xarray.DataArray (x: 5)> array([0, 1, 2, 3, 4]) Coordinates: * x (x) int64 1 2 ``` Problem descriptionA side effect of the GroupBy.first method call is that it substitutes the original array coordinates with the grouped ones . Expected Outputarr <xarray.DataArray (x: 5)> array([0, 1, 2, 3, 4]) Coordinates: * x (x) int64 1 1 1 2 2 Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/2153/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |