Version 0.66.0 (TBD)¶
This is a major Numba release. Numba now upgrades to llvmlite 0.48 with LLVM 22
and restores sys.monitoring on Python 3.14.4 and later. This release also adds
support for typed set containers and multi-dimensional fancy indexing.
Please note that the Intel SVML library remains unsupported as of this release. This loss of support was first noted in Numba 0.62.0 and was caused by the SVML patch not applying cleanly to the LLVM 20 code base when upgrading llvmlite. The impact is a loss of performance in cases where SVML would previously have been used. This will be addressed in a future release.
Please find a summary of all noteworthy items below.
Highlights¶
Add support for typed set containers¶
Typed set containers have now been introduced in Numba. This can be initialised using numba.typed.Set and supports a subset of the Python set API.
The following set methods are currently supported:
len(set())set().add()set().discard()set().__contains__()set().__iter__()set().__eq__()
For more details, see the ::ref::Numba documentation <https://numba.readthedocs.io/en/stable/reference/pysupported.html#typed-set>.
Add support for Fancy Indexing with Multiple Multi-Dimensional Array Indices in Numba¶
This PR adds complete support for fancy indexing with multiple array indices and/or multidimensional
array indices, in accordance with NumPy semantics. Cases that were previously unsupported,
such as using multiple fancy indices simultaneously or using multidimensional fancy index
arrays, are now fully supported along with inclusion of None / np.newaxis for
additional resulting dimensions.
For more details, and example usage see the ::ref::Numba documentation <https://numba.readthedocs.io/en/stable/reference/numpysupported.html#array-access>.
Improvements¶
Added traceback printing capability while NRT debugging¶
This improvement adds the capability to print the traceback of the NRT incref and decref calls.
This adds a flag NUMBA_DEBUG_NRT_STACK_LIMIT that helps user configure the
stack limit for traceback. By default, the stack limit is set to 0, which means
no traceback will be printed. Setting the stack limit to a positive integer will
enable traceback printing up to that many frames.
This flag is only effective when the NRT debugging mode is enabled. i.e when the
environment variable NUMBA_DEBUG_NRT is set to a non-empty value. Otherwise,
the flag will be ignored and no traceback will be printed regardless of its value.
Note that this functionality isn’t cache friendly, so it should be used with caution. It changes ABI call interface so users are required to clean the cache and recompile their code after setting the flag.
(PR-#8704)
Use ctypes instead of NumPy for checking the size of C types¶
This change replaces the use of NumPy’s dtype to check the size of C types with the use of Python’s built-in ctypes library.
Static __all__ declarations¶
numba.__all__ and numba.core.errors.__all__ are now statically defined.
This improves compatibility with type-checkers and IDE tooling, fixing missing
autocomplete suggestions and false-positive diagnostics.
Shifted NPDatetime and NPTimedelta to numba.np.types.datetime module.¶
This PR moves the definitions of NPDatetime and NPTimedelta from
numba.core.types to numba.np.types.datetime. This change is part of a larger effort
to refactor the NumPy support in Numba and to better organize the codebase.
The datatypes can still be accessed via numba.core.types for backward compatibility.
Removed NumPy based Unicode Character Sequence type width detection and indexing¶
This PR removes the dependency of CPython module on NumPy for automatic detection of
width of the Unicode Characters. This functionality is now provided by the ctypes
module.
Accelerate Processing for Large Control Flow Graphs¶
The asymptotic runtime of the algorithm to compute dominators in the control flow graph (CFG) is significantly improved. It now uses a memoization technique to avoid re-computing results by deriving the dominators from the immediate dominators as determined by the CHK (Cooper, Harvey & Kennedy) algorithm. This has a profound effect on the runtime of the CFG analysis for programs with large CFGs.
Type annotations for jit, njit, cfunc, and jit_module¶
Numba now ships type annotations for the jit, njit, and
cfunc decorators, plus jit_module. This improves type checker
and IDE support for these APIs.
Removed legacy NRT reference pruning pass removerefctpass¶
The NRT reference pruning pass removerefctpass has been
removed as it is no longer valid. It depends on an old assumption
of Numba, removing refcounts (deemed unnecessary) from functions
that return array object, take arguments that need refcounting
except array or call function(s) that return refcounted object.
Hence making it such that the function will not capture or create
references that extend the lifetime of any refcounted objects
beyond the lifetime of the function.
Performance Improvements and Changes¶
Bug Fixes¶
Fix comparison between Optional and None¶
Comparisons == (operator.eq) and != (operator.ne) between
Optional and None are now handled correctly. Also, comparisons of any
type other than Optional with None now yield a boolean literal.
Fix ZeroDivisionError for empty arrays in np.mean¶
Fixed a ZeroDivisionError that occurred when passing an empty array to
the np.mean function. Empty arrays are now handled correctly and return
nan as expected.
Fix scalar handling in np.std¶
Fix scalar handling in np.std function.
Previously, this function would fail when
called with scalar inputs.
Now scalar arguments are handled properly:
- Integer and boolean inputs return float64(0.0)
- Float and complex inputs preserve the input dtype
(e.g., np.float32 in returns float32(0.0))
arraymath: add temporal scalar support for np.min, np.max, np.all, np.any and np.mean.¶
Fix temporal scalar handling in np.min, np.max, np.all, np.any and
np.mean functions. Previously, these functions would fail when called with temporal
scalar inputs. They now properly handle both temporal scalar, scalar and array inputs,
returning the original value when a temporal scalar is provided.
Changes¶
Remove NumPy AVX512_SKX support detected from numba -s output¶
The NumPy AVX512_SKX support detected field has been removed from the
numba -s (system information) output. This field was added to provide
debug information for an AVX512_SKX accuracy bug that can no longer be
reproduced.
Use public PyMonitoring_* C API for sys.monitoring on Python 3.13+¶
Numba’s dispatcher integration with sys.monitoring on Python 3.13 and
later now goes through the public PyMonitoring_* C API instead of
CPython internal headers. This restores sys.monitoring support on
Python 3.14.4 and newer (#10538), which had been disabled
due to ABI changes in interpreter internals Numba previously relied on.
NUMBA_ENABLE_SYS_MONITORING again takes effect on those versions and
the associated UserWarning is no longer emitted. The Python 3.12 code
path is unchanged.
Update LLVM IR parameter attributes for LLVM 22 compatibility¶
Numba now emits captures(none) instead of the deprecated nocapture
parameter attribute when generating LLVM IR. This change is required for
compatibility with LLVM 22 and the accompanying llvmlite upgrade (numba/llvmlite#1421).
Documentation Changes¶
Document Tier 1.5 support policy¶
The Support Tiers documentation now describes a new “Tier 1.5” category covering experimental releases for emerging release configurations. This support tier currently includes the previously released Python 3.14 free-threading builds.
Remove Gitter¶
References to the Numba Gitter channels have been removed from the documentation and source code. Users seeking help should use the Numba Discourse forum instead.
Update contribution and coding convention guides¶
Consolidated coding style and convention documentation into the contribution
guide. Added a best practices section in the new
docs/source/developer/coding_guidelines.rst, aimed at both contributors
and code reviewers.
Pull-Requests:
PR #8704: Added traceback printing capability while NRT debugging (kc611)
PR #10131: Added initial typed set implementation based on typed dict implementation (Kaustubh Milind Chaudhari kc611 swap357)
PR #10387: Precompute variable assignments (esc JonAnCla sklam)
PR #10432: Add support for Fancy Indexing in Numba (kc611 sklam stuartarchibald)
PR #10444: CI: remove avx512 disabling logic from test steps (swap357)
PR #10467: Use ctypes.itemsize() to determine datatype length instead of NumPy .itemsizes attribute (kc611)
PR #10469: Fix ZeroDivisionError for np.mean([]) (auderson swap357)
PR #10482: fix RecursionError on large, generated CFGs (esc)
PR #10484: Fix jit decorator docstring formatting (kyleaoman)
PR #10489: Shifted Numpy Datetime to numba.np module (esc kc611)
PR #10490: Removed NumPy based unicode charseq type width detection and indexing (Kaustubh Milind Chaudhari)
PR #10493: add scalar handling for np.std overload (Part of #10408) (ElijahKas0)
PR #10499: Fix swapped shapes in slice assignment error message - Fixes #10402 (Meenakshi-1802)
PR #10500: Pin pypa/gh-action-pypi-publish action to ed0c539 (renovate[bot])
PR #10505: type annotations for jit, njit, cfunc, and jit_module (jorenham swap357)
PR #10507: update release date and version support table 0.65 (swap357)
PR #10508: update core/types/__init__.pyi typing stubs (jorenham)
PR #10513: type annotations for numba.core.abstract.* (jorenham)
PR #10515: unique overload function names in numba.cpython (jorenham)
PR #10516: rename classmethod param from
selftoclsincuda.cudadrv.driver(jorenham)PR #10523: Support native containers list, dict, set, tuple as Numba types (esc izruff)
PR #10525: configure stubtest and add a maint/stubtest.py script (jorenham swap357)
PR #10526: Update pypa/gh-action-pypi-publish digest to cef2210 (renovate[bot])
PR #10529: Updated
int_to map to int64 instead ofctypes.c_long(kc611)PR #10531: Update actions/upload-artifact action to v7.0.1 (renovate[bot])
PR #10532: CI: remove build-env LC_RPATH from osx-arm64 wheel (swap357)
PR #10533: arraymath: add temporal scalar support for np reduction functions (amishhaa)
PR #10541: GHA: replace json matrices with python evaluation scripts (swap357)
PR #10543: Refactored min/max functionality into overloads (esc kc611)
PR #10544: Refactored int constructor into overload API (kc611)
PR #10551: type annotations for Dispatcher (jorenham swap357)
PR #10558: numba.core.types.function_type type stubs (Guilherme Leobas jorenham)
PR #10562: Cherry pick and changelog update for 0.65.1 (esc stuartarchibald swap357)
PR #10566: numba.core.types.functions type stubs (Guilherme Leobas jorenham swap357)
PR #10568: Update conda-incubator/setup-miniconda action to v4 (renovate[bot])
PR #10575: Run stubtest and mypy with Python 3.11 in CI (jorenham)
PR #10577: refactor: conda build command on GHA workflows (swap357)
PR #10579: Fix and complete the type stubs for core.extending (jorenham)
PR #10583: numba.np.ufunc.{ufunc_base,dufunc,gufunc} type stubs (jorenham swap357)
PR #10586: Fixing Zenodo badge (esc travishathaway)
PR #10587: Don’t force tuple for single-dim pndindex. (DrTodd13)
PR #10588: Update dependency mypy to v2 (renovate[bot])
PR #10590: Fixed accidentally excluded dtypes in sum tests and optimized tests for better test suite runtime (kc611)
PR #10592: Fix incorrect docstring for TypeRefAttribute (fixes #8023) (lucap123)
PR #10602: Update contribution and coding convention guides (esc sklam)
PR #10604: Fix coverage.py with sysmon support (guilhermeleobas)
PR #10613: Update actions/stale action to v10.3.0 (renovate[bot])
PR #10627: Update actions/checkout action to v6.0.3 (renovate[bot])
PR #10630: llvm 22 support: replace nocapture to captures(none) (swap357)
PR #10632: update version support table for 0.66.0rc1 (swap357)
Authors: