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/6953#issuecomment-1228461073,https://api.github.com/repos/pydata/xarray/issues/6953,1228461073,IC_kwDOAMm_X85JONQR,10194086,2022-08-26T13:03:04Z,2022-08-26T13:03:04Z,MEMBER,"It does work if the array keeps the size: ```python data.resample(index=""M"").apply(lambda x: x.values) ``` As a workaround you could allow your function to consume a dummy axis. Or you could pass `dim` as `...` ```python data.resample(index=""M"").reduce(lambda x, axis: 1) # workaround 1 data.resample(index=""M"").reduce(lambda x: 1, dim=...) # workaround 2 ``` (`reduce` only passes `axis` if `dim is not None` but `groupby` passes the `group_dim` per default. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1350803561 https://github.com/pydata/xarray/issues/6953#issuecomment-1227218693,https://api.github.com/repos/pydata/xarray/issues/6953,1227218693,IC_kwDOAMm_X85JJd8F,10194086,2022-08-25T12:53:32Z,2022-08-25T12:53:32Z,MEMBER,"`apply` seems to expect that the applied function returns a DataArray. As an alternative could you use `data.resample(index=""M"").reduce(np.median)`?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1350803561