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/6870#issuecomment-1467278730,https://api.github.com/repos/pydata/xarray/issues/6870,1467278730,IC_kwDOAMm_X85XdOWK,2448579,2023-03-14T03:01:29Z,2023-03-14T03:01:29Z,MEMBER,Seems like we should transition this to `apply_ufunc`.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1326238990 https://github.com/pydata/xarray/issues/6870#issuecomment-1465228869,https://api.github.com/repos/pydata/xarray/issues/6870,1465228869,IC_kwDOAMm_X85XVZ5F,43316012,2023-03-12T15:32:01Z,2023-03-12T15:32:01Z,COLLABORATOR,"The logic of figuring out what stays and what goes is different in `DataArray` and `Dataset`. `DataArray` reduces the variable and then kicks out all dims, coords, indexes that don't fit anymore. `Dataset` tries to do the selection on the fly (and apparently fails to do so).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1326238990 https://github.com/pydata/xarray/issues/6870#issuecomment-1465227486,https://api.github.com/repos/pydata/xarray/issues/6870,1465227486,IC_kwDOAMm_X85XVZje,43316012,2023-03-12T15:25:47Z,2023-03-12T15:27:31Z,COLLABORATOR,"This is actually a bug in `Dataset.reduce`, it will drop the time index as well. See this example: ```python da = xr.DataArray([[1, 2, 3], [4, 5, 6]], dims=[""x"", ""y""], coords={""x"": [5, 6]}) da.reduce(lambda x, *_, **__: x, dim=""x"") # has time coord ds = xr.Dataset({""a"": da}) ds.reduce(lambda x, *_, **__: x, dim=""x"") # lost time coord ``` Probably the assumtion when writing this code was that the passed function actually reduces the dim.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1326238990