issue_comments: 592191561
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/3785#issuecomment-592191561 | https://api.github.com/repos/pydata/xarray/issues/3785 | 592191561 | MDEyOklzc3VlQ29tbWVudDU5MjE5MTU2MQ== | 11326731 | 2020-02-27T21:42:54Z | 2020-02-27T22:41:48Z | NONE | @ngreenwald you need to update your version of xarray to 0.12.2 or greater and use the Here your example corrected, showing the expected output: ```python import xarray as xr import numpy as np import os create two different xarrays with different sizes and coordstest_xr1 = xr.DataArray(np.zeros((5, 5, 3)), coords=[range(5), range(5), ["x1", "y1", "z1"]], dims=["1", "2", "3"]) test_xr2 = xr.DataArray(np.zeros((10, 2, 3)), coords=[range(10), range(2), ["x2", "y2", "z2"]], dims=["1", "2", "3"]) display(test_xr1.coords)
display(test_xr2.coords)
Coordinates:
* 1 (1) int64 0 1 2 3 4 5 6 7 8 9
* 2 (2) int64 0 1
* 3 (3) <U2 'x2' 'y2' 'z2'
save first xarray, reload it, and inspect coordstest_xr1.to_netcdf("test_xr.xr")
loaded_xr = xr.load_dataarray("test_xr.xr")
loaded_xr.coords
remove first xarray, save second with the same name, and load itos.remove("test_xr.xr")
test_xr2.to_netcdf("test_xr.xr")
loaded_xr = xr.load_dataarray("test_xr.xr")
loaded_xr.coords
|
{
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
568705055 |