issues: 111795064
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
111795064 | MDU6SXNzdWUxMTE3OTUwNjQ= | 627 | string coordinate gets converted to object coordinate upon addition of variable to dataset | 1322974 | closed | 0 | 10 | 2015-10-16T09:29:58Z | 2021-03-27T21:19:33Z | 2021-03-27T21:19:33Z | CONTRIBUTOR | With the current HEAD, consider ``` import numpy as np from xray import * ds = Dataset({"1": DataArray(np.zeros(3), dims=["a"], coords={"a": list("xyz")})}) print(ds) ds["2"] = DataArray(np.zeros(2), dims=["a"], coords={"a": list("xy")}) print(ds) ``` This outputs
Note that the dtype of the Python3.5, numpy 1.10.1, xray master (6ea7eb2b388075cc838c5ddf0ddaa47020cfcb89) With 0.6.0 the coordinate is of object dtype both before and after. I forgot why I tried master but I must have had a good reason... |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/627/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |