issue_comments: 846307431
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/issues/5361#issuecomment-846307431 | https://api.github.com/repos/pydata/xarray/issues/5361 | 846307431 | MDEyOklzc3VlQ29tbWVudDg0NjMwNzQzMQ== | 5635139 | 2021-05-21T23:24:27Z | 2021-05-21T23:24:40Z | MEMBER | That's surprising indeed. I confirmed the bug was present in 0.17.0 It also seems unrelated to uniqueness in the non-grouped-by dimension: ```python In [7]: data['y'].values = [0,1,2,3] In [8]: data['y'].values Out[8]: array([0, 1, 2, 3]) In [9]: data Out[9]: <xarray.DataArray (x: 4, z: 2)> array([[ 0.13156972, 0.13986012], [ 1.61815504, 0.11421297], [ 0.15819393, -0.5183183 ], [ 0.30672251, 0.34373302]]) Coordinates: * x (x) <U1 'a' 'b' 'a' 'c' y (x) int64 0 1 2 3 Dimensions without coordinates: z In [10]: data.T.groupby('x').mean() Out[10]: <xarray.DataArray (z: 2, x: 3)> array([[ 0.14488182, 1.61815504, 0.30672251], [-0.18922909, 0.11421297, 0.34373302]]) Coordinates: * x (x) object 'a' 'b' 'c' y (x) int64 0 1 2 3 # <-- the size must be 3!! Dimensions without coordinates: z ``` |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
898657012 |