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/2685#issuecomment-454981881,https://api.github.com/repos/pydata/xarray/issues/2685,454981881,MDEyOklzc3VlQ29tbWVudDQ1NDk4MTg4MQ==,5635139,2019-01-16T23:20:34Z,2019-01-16T23:20:34Z,MEMBER,"Thanks for the report @lexual . Agree that's unclear: The error message should state that you use `apply` since it's a lambda; e.g. ```python fn = lambda x: xr.DataArray(3) da.resample(time='QS-DEC').apply(fn) Out[19]: array([3, 3, 3, 3]) Coordinates: * time (time) datetime64[ns] 1999-12-01 2000-03-01 2000-06-01 2000-09-01 ``` We'd take a PR to fix that, but fairly low priority given it's a deprecated feature But the function also fails for `fn = lambda values: 3` (and `fn = lambda x: x.sum().item()`); I think we could add something to handle a function that returns a number rather than an array ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,400039356