issues: 385215500
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
385215500 | MDU6SXNzdWUzODUyMTU1MDA= | 2579 | sortby(dim) removes dimension from an array if dim is a repeated dimension | 14000880 | closed | 0 | 1 | 2018-11-28T11:06:54Z | 2018-11-28T22:33:15Z | 2018-11-28T22:33:15Z | NONE | Related to #1378. As mentioned there, xarray sometimes seems to have problems with repeated dimensions. sortby() such a dimension seems to be an example: ```python ds = xr.DataArray(np.eye(2), coords={'alt': [100, 200], 'alt': [100, 200], }, dims=('alt', 'alt'), name='cov').to_dataset() print(ds) <xarray.Dataset> Dimensions: (alt: 2) Coordinates: * alt (alt) int64 100 200 Data variables: cov (alt, alt) float64 1.0 0.0 0.0 1.0 print(ds.sortby('alt')) <xarray.Dataset> Dimensions: (alt: 2) Coordinates: * alt (alt) int64 100 200 Data variables: cov (alt) float64 1.0 1.0 ``` Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2579/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |