fast N-dimensional aggregation functions with numba