diff --git a/flox/aggregations.py b/flox/aggregations.py index 0c2e82bb..f33a0d51 100644 --- a/flox/aggregations.py +++ b/flox/aggregations.py @@ -830,7 +830,17 @@ def _initialize_aggregation( ) final_dtype = _normalize_dtype(dtype_ or agg.dtype_init["final"], array_dtype, fill_value) - if agg.name not in ["first", "last", "nanfirst", "nanlast", "min", "max", "nanmin", "nanmax", "topk"]: + if agg.name not in [ + "first", + "last", + "nanfirst", + "nanlast", + "min", + "max", + "nanmin", + "nanmax", + "topk", + ]: final_dtype = _maybe_promote_int(final_dtype) agg.dtype = { "user": dtype, # Save to automatically choose an engine