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/7652#issuecomment-1480030763,https://api.github.com/repos/pydata/xarray/issues/7652,1480030763,IC_kwDOAMm_X85YN3or,6897215,2023-03-22T18:04:29Z,2023-03-22T18:04:29Z,NONE,"@kmuehlbauer, great!
I can confirm that both problems are indeed fixed on my end when using `h5netcdf` and the code from your PR :tada:","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 1, ""eyes"": 0}",,1632718954
https://github.com/pydata/xarray/issues/7652#issuecomment-1478911024,https://api.github.com/repos/pydata/xarray/issues/7652,1478911024,IC_kwDOAMm_X85YJmQw,6897215,2023-03-22T04:43:46Z,2023-03-22T04:44:17Z,NONE,"Thanks a lot @kmuehlbauer!
I replied in your PR :smile:
> 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/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/7652#issuecomment-1476826827,https://api.github.com/repos/pydata/xarray/issues/7652,1476826827,IC_kwDOAMm_X85YBpbL,6654709,2023-03-20T19:37:02Z,2023-03-20T19:37:40Z,NONE,"It seems that the ""string"" information is stored in the `encoding` of the loaded dataset. set in this block:
https://github.com/pydata/xarray/blob/f1ff956ff67f3c053a2514d93d35929059e17b07/xarray/backends/h5netcdf_.py#L208-L210
but this encoding is not ""applied"" to the dtype of the dataset's variable.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1632718954