NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Fast N-dimensional aggregation functions with Numba
Last release 9 days ago
25 Sep 2026
Release timing varies
gaps range from 8 days to 9 months
Most releases are documented
notes for 27 of 31 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
32 releases · first in 2019
Accept a list axis again in nancount , nansum , nanmean , nanvar , nanstd , nanquantile and nanmedian . 0.9.5 raised TypeError: 'list' object cannot b
axis again in nancount, nansum, nanmean, nanvar, nanstd, nanquantile and nanmedian. 0.9.5 raised TypeError: 'list' object cannot be interpreted as an integer, which broke dask's nanmedian and nanquantile, and xarray through dask. These functions now take every axis spelling numpy does, including a numpy integer, a 0-d or 1-d array, and a range. Thanks to @Kayvan-Zahiri (#843)axis=() in the same functions now reduces nothing, as in numpy, rather than reducing every axis (#846)axis to int | Sequence[int] | None in funcs.pyi, so a type-checked caller can pass a list (#843)stubtest allowlist entries (#820)Full Changelog: v0.9.5...v0.9.6
One column per quarter.
group_nanmean now promotes boolean and integer input to float64. It previously computed the mean in the input's integer dtype, so a group of [4, 5] ga
group_nanmean now promotes boolean and integer input to float64. It previously computed the mean in the input's integer dtype, so a group of [4, 5] gave 4 rather than 4.5 (#553)ValueError for a min_count greater than window, which no window can satisfy, instead of returning an all-NaN array (#817)nancorrmatrix and nancovmatrix (#759) and in the four moving matrix functions (#767), and accumulate in float64. On input far from zero the old form lost the result to cancellation: with standard-normal columns shifted by 1e8, move_covmatrix returned variances of -15 and move_corrmatrix values of 2.4. move_corrmatrix and move_exp_nancorrmatrix now also clip to [-1, 1], as np.corrcoef does-1 "no group" label into a large positive one, and the num_labels default no longer overflows on a label at the dtype's maximum (#749)axis in the move_exp_* functions (#598)move_corrmatrix, move_covmatrix, move_exp_nancorrmatrix and move_exp_nancovmatrix (#810)funcs.pyi (#812)nanquantile and nanmedian return types to np.ndarray, since **kwargs reaches the gufunc and an out= or dtype= argument decides the result dtype (#815)axis in the moving-function stubs (#783)move_corrmatrix and move_covmatrix move out of MOVE_FUNCS into a new MOVE_MATRIX_FUNCS list (#768)ty, and stubtest now checks the stubs against the runtime in CI (#472, #505, #748)Full Changelog: v0.9.4...v0.9.5
Fix group_nanargmax and group_nanargmin to support N-dimensional labels
group_nanargmax and group_nanargmin to support N-dimensional labels (#485)move_axes to raise AxisError for out-of-bounds axis indices instead of silently wrapping (#484)move_corrmatrix and move_covmatrix to use pairwise statistics, producing correct results when NaN values occur at different positions across variables (#482)allnan and anynan to initialize output arrays, preventing incorrect results on certain inputs (#481)supports_bool=False (like group_nanvar) to raise clear TypeError for boolean input (#478)axis parameter to exponential moving window function type stubs (#483)ddof parameter in nanvar/nanstd type stubs (#479)Full Changelog: v0.9.3...v0.9.4
Fix bfill/ffill to preserve integer dtypes by @max-sixty in #418
Full Changelog: v0.9.2...v0.9.3
0.9.2 is a maintenance release that fixes the CI/CD pipeline for publishing to PyPI.
0.9.2 is a maintenance release that fixes the CI/CD pipeline for publishing to PyPI.
These changes ensure reliable package publishing but do not affect the functionality of numbagg itself.
0.9.0 implements our own "dynamic" compilation for grouped functions, in lieu of numba's (which currently doesn't work with parallel functions). This
0.9.0 implements our own "dynamic" compilation for grouped functions, in lieu of numba's (which currently doesn't work with parallel functions). This allows us to compile a function only for the types of the current function call's arguments, rather than all possible types allowed by the function. The speeds up the JIT compilation of a single function call by ~4x for the grouped functions.
0.8.2 reduces numerical instability in moving (aka rolling) functions with very short windows, as well as slightly improving their performance.
0.8.2 reduces numerical instability in moving (aka rolling) functions with very short windows, as well as slightly improving their performance.
0.8.1 adds an experimental NUMBAGG_FASTMATH env var option (thanks @frazane ) which increases performance in some routines at the cost of minor inaccu
0.8.1 adds an experimental NUMBAGG_FASTMATH env var option (thanks @frazane) which increases performance in some routines at the cost of minor inaccuracy. Feel free to provide feedback in an issue if you find this helpful (or unhelpful!). There's also a change for numpy 2.0 compatibility (thanks @mathause), and some internal improvements.
0.8.0 includes nanmedian , a wrapper of nanquantile with one quantile of 0.5.
0.8.0 includes nanmedian, a wrapper of nanquantile with one quantile of 0.5.
0.7.2 raises an error if values outside [0, 1] are passed to nanquantile
0.7.2 raises an error if values outside [0, 1] are passed to nanquantile
0.7.1 removes a stray print statement from the code. Thanks to @mathause for raising and fixing the issue.
0.7.1 removes a stray print statement from the code. Thanks to @mathause for raising and fixing the issue.
0.7.0 adds a ddof argument to std & var aggregation & grouping functions. Internally, there are lots of new benchmarks, which are more clearly present
0.7.0 adds a ddof argument to std & var aggregation & grouping functions. Internally, there are lots of new benchmarks, which are more clearly presented in the Readme, and added some initial property tests.
0.6.8 contains mostly internal changes — the initial benchmarking approach is expanded to all functions and displayed in the new Readme. The same fram
0.6.8 contains mostly internal changes — the initial benchmarking approach is expanded to all functions and displayed in the new Readme. The same framework is now used to test all functions. We also ensure the functions don't emit warnings when handling expected inputs in our tests.
0.6.7 removes the temporary patch for the int8 issues we experienced previously in grouping functions, replacing it with something more robust. Specif
0.6.7 removes the temporary patch for the int8 issues we experienced previously in grouping functions, replacing it with something more robust. Specifically, when there are a very large number of items in a group and labels has a very small dtype, labels is cast to a higher dtype.
Following closely on the heels of 0.6.5, 0.6.6 works around another rare but serious bug with int8 types. We now coerce all int8 label arrays to int16
Following closely on the heels of 0.6.5, 0.6.6 works around another rare but serious bug with int8 types. We now coerce all int8 label arrays to int16.
Many thanks to @dcherian for the report.
0.6.5 works around a rare but serious bug — when a labels array with int8 type is used in a group function, numbagg can return an incorrect result. Th
0.6.5 works around a rare but serious bug — when a labels array with int8 type is used in a group function, numbagg can return an incorrect result. The bug requires the array to be a specific size. The currently implemented solution is a workaround rather than an understanding of the underlying issue. Check out https://github.com/numbagg/numbagg/issues/211 for more details.
0.6.4 fixes a small bug — the value for the window argument for rolling methods couldn't be equal to the axis length.
0.6.4 fixes a small bug — the value for the window argument for rolling methods couldn't be equal to the axis length.
Numbagg will now compile withmode="cpu" if it detects that it's being run in a ThreadPoolExecutor. Previously, the default mode="parallel" could cause
Numbagg will now compile withmode="cpu" if it detects that it's being run in a ThreadPoolExecutor. Previously, the default mode="parallel" could cause numba to abort the python program within that context.
Note that running in a multi-process context retains mode="parallel", so the new behavior should only be slower in infrequent cases, such as a local dask multi-threaded executor.
I'm not completely confident this is the globally optimal solution, so this may evolve. https://github.com/numba/numba/issues/9288 has more context.
0.6.2 allows grouping functions to take a wider range of int types as labels. Thanks to @dcherian for the contribution.
0.6.2 allows grouping functions to take a wider range of int types as labels. Thanks to @dcherian for the contribution.
Enables parallel mode in most functions. This radically improves performance in multi-core systems on multi-dimensional arrays (see benchmarks for det
0.6.1:
parallel mode in most functions. This radically improves performance in multi-core systems on multi-dimensional arrays (see benchmarks for details)moving_exp functions, which lets us decay values by different amountsnanquantile's compatibility with various axis valuesbottleneck as a comparisonAdd ffill & bfill, at ~2.7x pandas' performance
ffill & bfill, at ~2.7x pandas' performancemove_corr, move_cov, move_std, move_sum, move_var, in addition to the existing move_mean. These have 3.5-20x pandas' performance.pytest-benchmark. This includes a script which makes a nice output which we've added to the readme. It currently only covers the moving and moving_exp functions.Add a nanquantile function; approximately 4x faster than np.nanquantile when over 2 dimensions. It's slightly slower than np.quantile and pandas' .qua
nanquantile function; approximately 4x faster than np.nanquantile when over 2 dimensions. It's slightly slower than np.quantile and pandas' .quantileinf values for some exponential moving functions. Numerical values remain unchanged.Sets ddof=1 for std & var functions, mirroring the grouped & move_exp functions (but notably different from numpy)
ddof=1 for std & var functions, mirroring the grouped & move_exp functions (but notably different from numpy)move_exp_nancount functions, for exponentially weighted moving countsnancount as an alias for count0.4.5 fixes an issue with our new PyPI release workflow. 0.4.1-4 were not published to PyPI
0.4.5 fixes an issue with our new PyPI release workflow. 0.4.1-4 were not published to PyPI
…to be a keyword argument. This is technically a breaking change, though most consumers will be passing alpha as a kwarg already (xarray included).
0.4.0 adds some more exponentially weighted functions:
move_exp_nanstdmove_exp_nanvarmove_exp_nancorrmove_exp_nancovBecause functions can now take more than one array, the signature of the moving exponential functions has changed slightly to require alpha to be a keyword argument. This is technically a breaking change, though most consumers will be passing alpha as a kwarg already (xarray included).
This release adds a min_weight parameter to the exponential moving functions, so that it's possible to output values if there's a sufficient number of
This release adds a min_weight parameter to the exponential moving functions, so that it's possible to output values if there's a sufficient number of recent valid values — similar to the min_count count parameter to the simple moving functions.
After a lengthy hiatus of development on numbagg, we're back with a big release:
After a lengthy hiatus of development on numbagg, we're back with a big release:
Lots of new grouping functions, in an attempt to be an engine for flox, a library from @dcherian & others. The functions include:
group_nancountgroup_nanargmax, group_nanargmingroup_nanfirst, group_nanlastgroup_nansum_of_squaresgroup_nanprodgroup_nanall, group_nananygroup_nanvargroup_nanstdgroup_nanmax, group_nanminLots of performance improvements to existing grouping functions
Large test coverage expansion of grouping functions
Improvements to the exponentially weighted moving functions:
move_exp_nanvar functionA modest performance gain to existing moving functions.
Internally, we've removed some of the original hacks that were initially required. Thanks to numbagg for supporting many of these natively!
The documentation needs a pass — the Readme could be reorganized, and the benchmarks could be more systematically measured and reported. It's possible that these large changes have introduced small bugs — particularly around edge cases, such as unfamiliar dtypes. That said, the main use cases are quite well-tested, and we have pandas & numpy to thank for excellent comparisons to test against.)
Please report any issues or questions. I (@max-sixty) am excited numbagg is back, and will gauge how much to add on the extent to which folks find it useful. And ofc thanks to @shoyer for writing the original library!
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →