Skip to content

Commit 38438a2

Browse files
committed
Revert "revert"
This reverts commit 3b79f6e.
1 parent 5cd7bcb commit 38438a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flox/core.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,4 +1809,8 @@ def groupby_reduce(
18091809
if _is_minmax_reduction(func) and is_bool_array:
18101810
result = result.astype(bool)
18111811

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

0 commit comments

Comments
 (0)