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/pull/7654#issuecomment-1483082222,https://api.github.com/repos/pydata/xarray/issues/7654,1483082222,IC_kwDOAMm_X85YZgnu,6897215,2023-03-24T16:27:01Z,2023-03-24T16:27:01Z,NONE,"Just leaving a note here. I would expect that the datatype that was saved, is the datatype that is loaded. So preferably if I save a string array of e.g., type ` I can confirm that this fixes > - https://github.com/pydata/xarray/issues/7652#issuecomment-1476956975 (`bool` -> `int8`) > > But **not** `int64` -> `int32`, and ` `O` > - https://github.com/pydata/xarray/issues/7652#issuecomment-1476967312 > - https://github.com/pydata/xarray/issues/7652#issue-1632718954","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1632718954 https://github.com/pydata/xarray/pull/7654#issuecomment-1478909815,https://api.github.com/repos/pydata/xarray/issues/7654,1478909815,IC_kwDOAMm_X85YJl93,6897215,2023-03-22T04:41:05Z,2023-03-22T04:43:03Z,NONE,"Thanks a lot for the quick PR! I can confirm that this fixes - https://github.com/pydata/xarray/issues/7652#issuecomment-1476956975 (`bool` -> `int8`) But **not** `int64` -> `int32`, and ` `O` - https://github.com/pydata/xarray/issues/7652#issuecomment-1476967312 - https://github.com/pydata/xarray/issues/7652#issue-1632718954","{""total_count"": 2, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 1}",,1633623916 https://github.com/pydata/xarray/issues/7652#issuecomment-1476967312,https://api.github.com/repos/pydata/xarray/issues/7652,1476967312,IC_kwDOAMm_X85YCLuQ,6897215,2023-03-20T21:34:30Z,2023-03-20T21:34:30Z,NONE,"Another fun one where `int64` -> `int32`: ```python import xarray as xr da = xr.DataArray(data=[1], dims=[""x""], coords={""x"": [0]}) da.to_netcdf(""test.nc"", mode=""w"") da2 = xr.load_dataarray(""test.nc"") da.dtype, da2.dtype ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1632718954 https://github.com/pydata/xarray/issues/7652#issuecomment-1476956975,https://api.github.com/repos/pydata/xarray/issues/7652,1476956975,IC_kwDOAMm_X85YCJMv,6897215,2023-03-20T21:25:59Z,2023-03-20T21:34:24Z,NONE,"A similar problem where saving, loading, saving, loading changes the dtype `bool` -> `int8`: ```python import xarray as xr da1 = xr.DataArray(data=[True], dims=[""x""], coords={""x"": [0]}) da1.to_netcdf(""test.nc"", mode=""w"") da2 = xr.load_dataarray(""test.nc"") da2.to_netcdf(""test.nc"", mode=""w"") da3 = xr.load_dataarray(""test.nc"") assert da1.dtype == da3.dtype, ""Dtypes don't match"" ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1632718954 https://github.com/pydata/xarray/issues/1914#issuecomment-396737241,https://api.github.com/repos/pydata/xarray/issues/1914,396737241,MDEyOklzc3VlQ29tbWVudDM5NjczNzI0MQ==,6897215,2018-06-12T21:18:18Z,2018-06-12T21:18:18Z,NONE,"[This StackOverflow question](https://stackoverflow.com/questions/40503807/take-a-1d-list-of-results-and-convert-it-to-a-n-d-xarray-dataarray) is related to this ""issue"". ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,297560256