Skip to content

ENH: Avoid casting to int64/uint64 for GroupBy.sum and others before calling cython functions #48071

Closed
@phofl

Description

@phofl

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions