flox
flox copied to clipboard
CuPy support
- We should test with numpy-groupies. CuPy provides bincount, https://github.com/cupy/cupy/issues/7561
- We'd have to avoid factorizing with Pandas unfortunately and use
np.searchsorted
ornp.digitize
; or use CuDF?
Turns out scatter_* are a repacement for ufunc.at
not ufunc.reduceat
. The former does not take an axis
kwarg so we can't use it for now.
cupy 12 might have more ufunc support, so let's wait and see
Hi, CuPy maintainer here! We've created a dedicated tracker for ufunc features: https://github.com/cupy/cupy/issues/7082
Do you need reduceat
for specific ufuncs or all ufuncs?
Thanks for checking in @kmaehashi
Technically we could use
-
add.reduceat
,multiply.reduceat
,maximum.reduceat
, andminimum.reduceat
(withengine="flox"
) and -
multiply.at
,maximum.at
, andminimum.at
(forengine="numpy"
which usesnumpy_groupies
)
The second one is the default now, supporting .at
would be most helpful
For reduceat
, add.reduceat
would be the most useful since that lets us do sum
, mean
, var
and std
Thanks! Sounds it aligns with our v12 target 😄 cc/ @asi1024