Added
- The numba implementation is assembled from njit-callable kernels:
numpy_groupies.aggregate_numba.kernelsexports oneaggregate_*function per operation (aggregate_sum,aggregate_nansum,aggregate_median, ...), all callable from inside your own@numba.njitcode (#118). sortin the numba backend,reverse=Trueincluded (#120).float16input in the numba backend (#121). Numba has nofloat16type, so the values are widened, the kernels run in theirfloat32plan and an inexact result is rounded back once - which putscumsumand the other running aggregations closer to the exact value than the per-stepfloat16rounding of the numpy twin.step_countandstep_indicesin the numpy backend (#112).
Changed
- Integer
mean/var/stdaccumulate in a dtype wide enough to stay exact, and the three backends now agree on where that boundary is - narrow integer groups no longer wrap silently (#115). - The benchmark scripts take an argparse CLI, and the pandas and ufunc comparison implementations live in the benchmarks only (#119).
Fixed
reverse=Truedid not produce a descending sort (#120).- Cumulative aggregations looked across group boundaries; complex cumulative NaNs now stay inside their group (#107) and the running aggregations are group independent (#116).
- NumPy scalar dtype classes such as
complex64andfloat32were not recognised by the dtype checks (#117). - Aggregating a numpy scalar (
np.float32(2.5)) or a 0d array raised -TypingErrorin the numba implementation,TypeErrorin the pure python one (#122). - Wide integer sums could lose exactness in the numpy backend (#108).
Development
The test suite runs on one worker per core by default, which halves the CI jobs (#124); unsupported implementation/function combinations are deselected at collection time (#113, #114) and the parametrization labels name dtypes (float16, not <class 'numpy.float16'>) (#123).