Version 0.60.0 (13 June 2024)¶
Table of Contents
This is a major Numba release. Numba now has binary support for NumPy 2.0. Users should note that this does NOT yet include NEP 50 related type-level changes which are still in progress. This release does not guarantee execution level compatibility with NumPy 2.0 and hence users should expect some type and numerical deviations with respect to normal Python behavior while using Numba with NumPy 2.0.
Please find a summary of all noteworthy items below.
Highlights¶
NumPy 2.0 Binary Support¶
Added Binary Support for NumPy 2.0. However, this does not yet include NEP 50 related type-level changes which are still in progress.
Following is a summary of the user facing changes:
The
ptp()method previously available for arrays has been deprecated. Instead, it is recommended to use thenp.ptp(arr)function.The data type
np.bool8has been deprecated and replaced withnp.bool.The
np.productfunction is deprecated; users are advised to usenp.prodinstead.Starting from NumPy version 2.0, the
itemset()method has been removed from thendarrayclass. To achieve the same functionality, utilize the assignment operationarr[index] = value.Deprecated constants
np.PINFandnp.NINFshould be replaced withnp.inffor positive infinity and-np.inffor negative infinity, respectively.
(PR-#9466)
New Features¶
Enhance guvectorize support in JIT code¶
Generalized universal function support is extended, it is now possible to call
a @guvectorize decorated function from within a JIT-compiled function.
However, please note that broadcasting is not supported yet. Calling a
guvectorize function in a scenario where broadcast is needed may result in
incorrect behavior.
(PR-#8984)
Improvements¶
Expand isinstance() support for NumPy datetime types¶
Adds support of numpy.datetime64 and numpy.timedelta64 types in
isinstance().
(PR-#9455)
Python 3.12 sys.monitoring support is added to Numba’s dispatcher.¶
Python 3.12 introduced a new module sys.monitoring that makes available an
event driven monitoring API for use in tools that need to monitor execution e.g.
debuggers or profilers. Numba’s dispatcher class (the code that handles transfer
of control between the Python interpreter and compiled code) has been updated to
emit sys.monitoring.events.PY_START and sys.monitoring.events.PY_RETURN
as appropriate. This allows tools that are watching for these events to identify
when control has entered and returned from compiled code. As a result of this
change, Numba compiled code is now identified by cProfile in the same way
that it has been historically i.e. it will be present in performance profiles.
(PR-#9482)
CUDA API Changes¶
Documentation Changes¶
Pull-Requests:¶
PR #8984: Support @gufunc inside @jit (guilhermeleobas)
PR #9239: ufunc.at (guilhermeleobas)
PR #9274: CUDA: Add support for compilation to LTO-IR (gmarkall)
PR #9364: Release notes fixes for appropriate Towncrier header underlines (kc611)
PR #9369: Fix release notes link in bug report template (gmarkall)
PR #9378: Add float(<string literal>) ctor (guilhermeleobas)
PR #9394: fix TypeError: ‘_DeviceContextManager’ object is not callable (i7878)
PR #9411: Doc updates for 0.59.0 final. (stuartarchibald)
PR #9416: Add math.log2 support (guilhermeleobas)
PR #9417: Add np.log* bindings for CUDA (guilhermeleobas gmarkall)
PR #9436: Add timing and junit xml output to testsuite (sklam)
PR #9437: Remove dependencies between Numba’s Cpython and NumPy module (kc611)
PR #9438: Add math.nextafter support for nopython mode. (groutr)
PR #9454: Don’t attempt to register overloads that aren’t for this target in BaseContext and related fixes (gmarkall)
PR #9482: Add support for sys.monitoring events. (stuartarchibald)
PR #9487: Add CUDA 12 conda installation docs (bdice gmarkall)
PR #9504: added np.size() overload and added tests (shourya5)
PR #9531: Module pass manager: Don’t add passes for unsupported LLVM versions (gmarkall)
PR #9532: Fix hoisting bug to exclude variables used in containers or calls. (DrTodd13)
PR #9549: Make new_style the default error capturing mode (gmarkall sklam)
PR #9568: fix sigabrt in parfors tests (esc stuartarchibald)
PR #9586: Hoisting logic needs to consider dependency on prior unhoistable variable (sklam)
PR #9596: Added inline_closurecall as an import during registry loading (kc611)