ENH: Avoid casting to int64/uint64 for GroupBy.sum and others before calling cython functions #48071
Labels
Closing Candidate
May be closeable, needs more eyeballs
Enhancement
Groupby
NA - MaskedArrays
Related to pd.NA and nullable extension arrays
Currently, we are casting the arrays to int64/uint64 in case of integer dtypes before calling the cythong functions. This happens, because there is no efficient way of compiling the cython files without creating lots of unneeded combinations of dtypes.
The out array needs either float64, float32, int64 or uint64 dtype while the input array can keep the dtype. But this creates unwanted dtype combinations when compiling. If we can avoid this, we can keep the input dtype when calling the cython op. This saves memory for small integer dtypes, cc #48059
One attempt of handling the dtype precisions was made in #48044
The text was updated successfully, but these errors were encountered: