Skip to content

Commit

Permalink
Revert "revert"
Browse files Browse the repository at this point in the history
This reverts commit 3b79f6e.
  • Loading branch information
dcherian committed Nov 5, 2022
1 parent 5cd7bcb commit 38438a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flox/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1809,4 +1809,8 @@ def groupby_reduce(
if _is_minmax_reduction(func) and is_bool_array:
result = result.astype(bool)

# we lose dtype information when creating a pandas Index
# That's always int64 or float64, so cast back
# TODO: migrate to NumericIndex but I think this will just fix itself
groups = tuple(g.astype(b.dtype) for g, b in zip(groups, bys))
return (result, *groups)

0 comments on commit 38438a2

Please sign in to comment.