issue_comments: 855037803
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/5082#issuecomment-855037803 | https://api.github.com/repos/pydata/xarray/issues/5082 | 855037803 | MDEyOklzc3VlQ29tbWVudDg1NTAzNzgwMw== | 14808389 | 2021-06-04T22:13:35Z | 2021-06-04T22:13:51Z | MEMBER | I think dropping on the first operation is the right thing to do, otherwise reloading might cause surprising issues. Consider this: ```python In [4]: encoding = { ...: "add_offset": 267.39366454179356, ...: "scale_factor": 0.0006500423894110363, ...: "dtype": np.dtype("int16"), ...: "_FillValue": -32767, ...: } ...: ds = xr.Dataset({"arr": ("x", [270, 280, 290], {}, encoding)}) ...: ds Out[4]: <xarray.Dataset> Dimensions: (x: 3) Dimensions without coordinates: x Data variables: arr (x) int64 270 280 290 In [5]: ds.arr[:] = [3, 4, 5] ...: ds.to_netcdf("abc.nc") ...: with xr.open_dataset("abc.nc").load() as loaded: ...: display(loaded) ...: display(loaded.arr) ...: <xarray.Dataset> Dimensions: (x: 3) Dimensions without coordinates: x Data variables: arr (x) float32 258.6 259.6 260.6 <xarray.DataArray 'arr' (x: 3)> array([258.60706, 259.6068 , 260.60724], dtype=float32) Dimensions without coordinates: x ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
842438533 |