Skip to content
forked from pydata/xarray

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Apr 10, 2022
1 parent da31c4f commit d613779
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xarray/core/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ def _flox_reduce(self, dim, **kwargs):

# TODO: handle bins=N in flox
if self._bins is not None:
expected_groups = (self._bins,)
# TODO: fix this; When binning by time, self._bins is a DatetimeIndex
expected_groups = (np.array(self._bins),)
isbin = (True,)
# This is an annoying hack. Xarray returns np.nan
# when there are no observations in a bin, instead of 0.
Expand Down

0 comments on commit d613779

Please sign in to comment.