issues: 125708367
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
125708367 | MDU6SXNzdWUxMjU3MDgzNjc= | 712 | DataArrays should display their coordinates in the natural order | 1322974 | open | 0 | 13 | 2016-01-08T22:33:05Z | 2020-11-06T18:48:54Z | CONTRIBUTOR | Consider ``` from collections import * import numpy as np from xray import * d1 = DataArray(np.empty((2, 2)), coords=OrderedDict([("foo", [0, 1]), ("bar", [0, 1])])) d2 = DataArray(np.empty((2, 2)), coords=OrderedDict([("bar", [0, 1]), ("foo", [0, 1])])) ds = Dataset({"d1": d1, "d2": d2}) print(ds.d1) print(ds.d2) ``` This outputs
I understand that internally both DataArrays use the same coords object and thus the same coords order, but it would be helpful if, when printing d2 by itself, the coordinates were printed in the natural order ("bar", "foo"). In particular, when working interactively, the list of coordinates at the end of the repr is the most easy thing to spot, and thus most helpful to know how to format the call to |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/712/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |