Data Parallel Extension for NumPy
Repo IntelPython/dpnp, read from GitHub 17 min ago. IntelPython has not joined Take My Repo.
The highlight of this release: dpnp achieves 100% compliance with the Python array API specification (revision 2025.12).
This release introduces the dpnp.scipy.sparse namespace with a csr_matrix class and the cg, gmres and minres iterative solvers in dpnp.scipy.sparse.linalg.
This release adds support for Python 3.15 and for free-threaded Python builds.
This release is compatible with NumPy 2.5.4.
To align with NumPy 2.5 and the Python array API, dpnp.meshgrid, dpnp.broadcast_arrays, dpnp.atleast_1d, dpnp.atleast_2d, dpnp.atleast_3d and dpnp.ogrid now return a tuple instead of a list, and dpnp.row_stack and the support for 2-element vectors in dpnp.cross are removed.
This release requires DPC++ compiler 2026.1.1 or newer and dpctl 0.23.0 or newer.
dpnp.tensor.usm_ndarray setters and getters to avoid ABI breakage if dpnp.tensor.usm_ndarray is modified #2866dpnp.ndarray #2889--includes and --include-dir options to the dpnp CLI #2916dpnp-config.cmake to make find_package(Dpnp) work out of the box, and an example which uses it #2941dpnp.lib.stride_tricks.as_strided #2991dpnp.tensor.broadcast_shapes to align with the 2025.12 version of the Python array API #3009dpnp.scipy.sparse namespace with dpnp.scipy.sparse.csr_matrix and dpnp.scipy.sparse.issparse, and implementation of dpnp.scipy.sparse.linalg.LinearOperator, dpnp.scipy.sparse.linalg.aslinearoperator, dpnp.scipy.sparse.linalg.cg, dpnp.scipy.sparse.linalg.gmres and dpnp.scipy.sparse.linalg.minres #2841dpnp.broadcast class implementation #2901ndmax keyword to dpnp.array for compatibility with NumPy #3044UsmNDArray_RemoveQueueRef C API function to release a queue reference obtained from UsmNDArray_GetQueueRef #3042rattler-build-compatible conda recipe (conda-recipe/rattler_recipe.yaml) alongside the existing conda-build recipe #3031"nuc" (nuclear) norm in dpnp.linalg.cond #3084dpnp.meshgrid and dpnp.tensor.meshgrid to return a tuple instead of a list, aligning with NumPy 2.5+ behavior and 2025.12 version of the Python array API standard #2854searchsorted implementations to align with the 2025.12 array API spec #2902.pxi includes in dpnp.tensor with modular .pxd/.pyx Cython imports #2913dpnp.eye and dpnp.tensor.eye with a branchless kernel #2937usm_ndarray_take and usm_ndarray_put to py_take and py_put and refactoring validation #2935dpnp.linalg.eig and dpnp.linalg.eigvals documentation to reflect NumPy's always-complex eigenvalue output for general matrices #2953dpnp.transpose/dpnp.permute_dims documentation #2940dpnp.take and dpnp.compress to cast the result into an out array of a different but same-kind dtype #2959dpnp.reshape and dpnp.ndarray.reshape docstrings #2964dpnp.atleast_1d, dpnp.atleast_2d, dpnp.atleast_3d, and dpnp.ogrid to return a tuple of arrays instead of a list #2965dpnp.fft functions for complex strided input by avoiding oversized allocations and extra copies #2939dpnp documentation styling with the Furo theme #2934sphinx.ext.napoleon to numpydoc #30592025.12 #2899dpnp.amax/dpnp.amin aliases with the canonical dpnp.max/dpnp.min in docstrings and code internally #2990dpnp.tensor.expand_dims with the Python array API by making axis a required argument #2988nd_item::barrier() member calls in the accumulators and gemm kernels with the SYCL 2020 sycl::group_barrier() free function #3006dpnp.broadcast_arrays and dpnp.tensor.broadcast_arrays to return a tuple instead of a list, aligning with the 2025.12 Python array API spec #29442026.1.1 and migrated to the OpenCL ICD loader from the conda-forge ocl-icd-system (Linux) and khronos-opencl-icd-loader (Windows) packages #2905dpctl version to 0.23.0 #2948dpnp_backend_c library against only the MKL SYCL domains it uses (BLAS, RNG, VM) #3012dpnp uses pybind11 3.1.0 #3015dpnp.linalg.norm by reusing the reduction result as the sqrt output buffer in the 2-norm and Frobenius-norm branches #3062dpnp.tensor.top_k with mode="largest" to no longer return NaN values (or complex values with a NaN component) ahead of finite values, matching the NaN-last order of dpnp.tensor.sort #3066dpnp.einsum result into C-order by building the product in the requested layout directly #3069dpnp.putmask by adding dedicated contiguous and strided SYCL kernels #3014dpnp.sort, dpnp.argsort, and their dpnp.ndarray/dpnp.tensor counterparts to place NaN values last instead of first when sorting in descending order #3066copy=None ("copy only if needed") in dpnp.nan_to_num #3083dpnp.linalg.pinv to compute the default tolerance from the machine epsilon of the data type used for the computation, and to return a floating-point result for an empty integer or boolean array #3090dpnp.nansum, dpnp.nanprod, dpnp.nancumsum and dpnp.nancumprod by replacing NaN values only in the distinct elements of the input #3108shape attribute of dpnp.ndarray and dpnp.tensor.usm_ndarray. Use dpnp.reshape/dpnp.tensor.reshape (or the reshape method) instead #2967dpnp.config.__DPNP_QUEUE_GPU__, dpnp.config.__DPNP_OUTPUT_NUMPY__ and dpnp.config.__DPNP_OUTPUT_DPCTL_DEFAULT_SHARED__, which have no effect; reading or setting them now emits a DeprecationWarning #3107dpnp.cross, which now requires (arrays of) 3-element vectors and raises ValueError otherwise #2950dpnp.row_stack in favor of dpnp.vstack #2957dpnp.ndarray.resize method from the documentation #2989BUILD_PREFIX paths onto the LIB and INCLUDE #3013dpnp is built with oneMKL 2026.0, caused by the destructor of the oneMKL mt19937 random number engine running while the library is being unloaded #2871range or list as index keys #2872conda build command syntax in GitHub workflows and documentation to use conda-build #2888dpnp.tensor.acosh result for complex(±0, NaN) special case to match the Python Array API specification #2914libtensor headers in the installed dpnp package #2915IndexError when mask dimensions don't match the indexed array dimensions, aligning with NumPy behavior. Previously, incompatible boolean masks silently returned incorrect results instead of raising an error #2929astype where casting floating point types to unsigned integral types could cause an intermediate signed integral type to overflow, leading to incorrect results #2930dpnp.tensor.expm1 result for complex(±0, 0) special case on CPU to match the Python Array API specification #2926dpctl functions which now return tuples (i.e., dpctl.SyclDevice.create_sub_devices) #2945PytestRemovedIn10Warning raised by pytest 9.1.0 by converting class-scoped fixtures to class methods #2952dpnp.linalg.svd(..., hermitian=True) returning a non-unitary vh for singular input arrays due to a zero sign appearing #2954dpnp.tensor.usm_ndarray (e.g. int(), float(), indexing) which failed with NumPy 2.5 after the in-place ndarray.shape assignment was deprecated #2958dpnp.mgrid and dpnp.ogrid to return consistent results between single-slice and tuple-of-slices syntax when the step is a complex number with a non-integer magnitude (e.g. 2.5j) #2971icx/icpx warning during conda build by stripping the GCC-only -fno-merge-constants flag injected by conda-forge into CFLAGS/CXXFLAGS #2978dpnp.asnumpy and dpnp.ndarray.asnumpy ignoring the order keyword, which caused a non-contiguous source array to be returned with a non-contiguous layout even when order="C" was requested #2980dpnp.tensor on Windows #2993dpnp.tensor.acosh and dpnp.tensor.acos returning infinity for complex numbers with large negative real parts #2928__array_namespace_info__().devices() and .default_device() to return Python array API compatible device objects #2979dpnp.interp with an empty input array x to return an empty array with the correct dtype #2985dpnp.interp returning nan when querying at an exact knot point whose adjacent fp value is inf #2986dpnp.tensor.usm_ndarray constructor when allocating new memory #2927dpnp.bincount raising a ValueError on an empty input array instead of returning an empty intp array #3018dpnp.tensor.top_k aborting for k=0 by returning empty result arrays without launching a zero-sized kernel #3022dpnp.equal, dpnp.not_equal, dpnp.less, dpnp.less_equal, dpnp.greater, dpnp.greater_equal) and dpnp.divide raising OverflowError when comparing an integer array against a Python integer scalar outside the array dtype's range #3017dpnp.ndarray get/set item) when the selection is empty (e.g. a scalar False index that injects a length-0 axis) #3019dpnp.repeat raising an unclear TypeError for a nested sequence of repeats #3024dpnp.ndarray.view ignoring the USM element offset of a sliced array, which also caused dpnp.einsum to silently return wrong results for a single sliced operand with no summed index #3037dpnp.all and dpnp.any aborting when reducing over an empty axis (e.g. an array with a zero-length dimension) #3021astype casting an out-of-range floating point value to a signed narrow integer type saturating to the destination min/max instead of wrapping like NumPy, generalizing the earlier unsigned-only fix #3033dpnp.insert silently ignoring out-of-bounds negative indices in a multi-element obj, so a mix of in-bounds and out-of-bounds indices now consistently raises IndexError #3041sycl::queue leak in usm_ndarray::get_queue()/get_device() #3042dpnp.linspace returning nan for equal infinite endpoints #3043dpnp.cumsum, dpnp.cumprod, and their nan/cumulative_* variants (including dpnp.tensor.cumulative_sum/cumulative_prod) silently returning incorrect results when accumulating along an axis of an array with more than one row The highlight of this release: the Array API-compliant tensor implementation has been migrated from dpctl.tensor into dpnp.tensor, simplifying maintenance, reducing cross-project dependencies, and allows the tensor implementation to evolve within dpnp.
This release changes the license from BSD-2-Clause to BSD-3-Clause.
This release achieves dpnp compatibility with Python 3.14 and enables distributing dpnp packages with the latest Python version.
Also, that release drops support for Python 3.9, making Python 3.10 the minimum required version.
dpnp.linalg.LinAlgError exception #2613dpnp.linalg.lu_solve for batch inputs (SciPy-compatible) #2619dpnp.exceptions submodule to aggregate the generic exceptions used by dpnp #2616dpnp.scipy.special.erfcx #2596dpnp.scipy.special.erfinv and dpnp.scipy.special.erfcinv #2624dpnp.ndarray.tolist method #2652dpnp.frexp #2635dpnp.ndarray.tofile method #2653pre-commit configuration with pyupgrade, actionlint, and gersemi hooks #2658dpnp.ndarray.tobytes method #2656dpnp.ndarray.__format__ method #2662dpnp.ndarray.__bytes__ method #2671dpnp.divmod #2674dpnp.isin function #2595dpnp.scipy.linalg.lu (SciPy-compatible) #2787dpnp.ndarray.view method with type parameter #2815dpctl.tensor into dpnp.tensor, making dpnp the primary owner of the Array API-compliant tensor layer #2856pybind11 CMake message due to using compatibility mode for Python #2614BSD-2-Clause to BSD-3-Clause #2593dpnp.modf function to be a part of ufunc and vm pybind11 extensions #2654dpnp.fft and dpnp.random submodules by removing wildcard imports and defining explicit public exports #2649out keyword to accept a tuple, bringing ufunc signatures into alignment with those in NumPy #2664dpnp.linalg and dpnp.scipy submodules #2663dpnp.reshape function with Python array API by making shape a required argument #2673dpnp public API exports by consolidating function exports in __init__.py and removing wildcard imports #2665 #2666usm_ndarray #2694-fno-sycl-id-queries-fit-in-int to support huge arrays #2721dpnp.fix to reuse dpnp.trunc internally #2722python setup.py develop deprecation notice #2716axes in dpnp.tensordot and dpnp.linalg.tensordot functions #2733file argument in dpnp.fromfile #2745dpnp.trim_zeros with NumPy 2.4 to support a tuple of integers passed with axis keyword #2746strides property of dpnp.ndarray with NumPy and CuPy implementations #2747dpnp.nan_to_num to support broadcasting of nan, posinf, and neginf keywords #2754dpnp.partition implementation to reuse dpnp.sort where it brings the performance benefit #2766dpnp uses pybind11 3.0.2 #2773raw and r modes #2785backend/extensions/ to a unified backend/kernels/ directory hierarchy #2816dpnp uses pybind11 3.0.3 #2834dpnp.tensor tests by default in conda build --test to prevent OOM failures during package testing. Set SKIP_TENSOR_TESTS=0 to re-enable them on systems with enough memory #2860dpnp uses pybind11 3.0.4 #2865k keyword in dpnp.triu_indices #2855dpnp.asfarray is deprecated. Use dpnp.asarray with an appropriate dtype instead #2650out positionally to dpnp.minimum and dpnp.maximum is deprecated. Pass the output with the keyword form, e.g. dpnp.minimum(a, b, out=c) #2659dpnp.ndarray.T property is deprecated for not two-dimensional array to be compatible with the Python array API standard. To achieve a similar behavior when a.ndim != 2, either a.transpose(), or a.mT (swaps the last two axes only), or dpnp.permute_dims(a, range(a.ndim)[::-1]) can be used #2681dpnp.fix is deprecated. Use dpnp.trunc instead, which provides identical functionality #2730newshape parameter from dpnp.reshape, which has been deprecated since dpnp 0.17.0. Pass it positionally or use shape= on newer versions #2670pytest configuration from pyproject.toml #2729onemkl-sycl-stats package #2771dpctl.tensor module #2709a nd in docstrings #2719dpnp.linspace to return an incorrect output shape when inputs were passed as arrays #2712dpnp always returns the base allocation pointer, when the view start is expected #2651dpnp.geomspace and dpnp.logspace when called with explicit device keyword but any input array is allocated on another device #2723.data.ptr property on array views to correctly return the pointer to the view's data location instead of the base allocation pointer #2812dpnp.diagonal to return correct values for empty diagonals #2814dpnp.identity and dpnp.gradient #2835dpnp.tensor.round to use device-aware output dtype for boolean input #2851dpnp.linalg.qr by releasing the GIL before OneMKL orgqr call to prevent host tasks contention #2850dpnp.linalg.matrix_rank to properly handle an empty input array #2853Full Changelog: 0.19.1...0.20.0
This release achieves dpnp compatibility with Python 3.14 and enables distributing dpnp packages with the latest Python version.
This release is compatible with NumPy 2.3.5.
v0.9 #26552025.3 release changes #2648scipy>=0.16.0 per each integer dtype #2669Full Changelog: 0.19.0...0.19.1
This release introduces a set of new dpnp.ndarray methods and SciPy-compatible functions to improve CuPy compatibility.
It also enhances the performance of existing functions and improves documentation completeness.
Additionally, it extends support for building dpnp from the source for NVIDIA GPUs, with optional architecture selection.
This release is compatible with NumPy 2.3.3.
--target-cuda[=ARCH] option to replace the deprecated --target=cuda, allowing users to build for CUDA devices with optional architecture selection using CodePlay oneAPI plug-in #2478pre-commit rules, including protection against direct commits to master/maintenance branches #2500dpnp.ndarray.view method #2520syrk from oneMKL to perform symmetric rank-k update which is used for a specialized matrix multiplication where the result is a symmetric matrix 2509timeout-minutes property to GitHub jobs #2526dpnp.ndarray.data and dpnp.ndarray.data.ptr attributes #2521dpnp.ndarray.__contains__ method #2534dpnp.linalg.lu_factor (SciPy-compatible) #2557, #2565dpnp.piecewise #2550dpnp.linalg.lu_solve for 2D inputs (SciPy-compatible) #2575dpnp.special.erfc #2588dpnp.scipy submodule to aggregate new SciPy-compatible functions from linalg and special namespaces #2603pre-commit configuration to run autoupdate weekly #2479--target-hip build option to only accept a gfx-prefixed value #2481dpnp.kaiser by getting rid of unnecessary template #2472--onemkl-interfaces and --onemkl-interfaces-dir options for building script are deprecated, instead --onemath and --onemath-dir are introduced to be aligned with oneMath specification #2487xp keyword in docstring of dpnp.interp #2506PEP-639 #2511v0.8 #2514axes for dpnp.fft.irfftn to be in forward order #2524numpy.testing.suppress_warnings with appropriate calls from the warnings module #2529dpnp.ndarray class and added a page with description of supported constants #2422dpnp.size to accept tuple of ints for axes argument #2536ci section in .pre-commit-config.yaml with a new GitHub workflow with scheduled run to autoupdate the pre-commit configuration #2542dpnp.linalg.solve to use oneMKL LAPACK gesv directly #2558dpnp.isclose function by implementing a dedicated kernel for scalar rtol and atol arguments #2540dpnp.pad to support pad_width keyword as a dictionary #2535dpnp.erf function through pybind11 extension of OneMKL call or dedicated kernel in ufunc namespace #2551dpnp.linalg.det and dpnp.linalg.slogdet #2572dpnp.tril_indices and dpnp.triu_indices to clarify the returned order of indices #2586dpnp uses pybind11 3.0.1 #2594--onemkl-interfaces and --onemkl-interfaces-dir options for building script are deprecated, instead --onemath and --onemath-dir are introduced to be aligned with oneMath specification #2487pre-commit GitHub workflow to pass no-commit-to-branch check #2501dpnp.matvec and dpnp.vecmat to correct a typo #2503dpnp.resize implementation #2508dpnp.unique with 1d input array and axis=0, equal_nan=True keywords passed where the produced result doesn't collapse the NaNs #2530, #2587dpnp.ndarray constructor is called with dpnp.ndarray.data as buffer keyword #2533dpnp.linalg.cond to always return a real dtype #2547dpnp.random functions to allow any value of size where each element is castable to Py_ssize_t type #2578conda build --test issue in python 3.9 environment #2583Autoupdate pre-commit GitHub workflow #2591linalg submodule #2608Full Changelog: 0.18.1...0.19.0
This release achieves dpnp compatibility with Python 3.13 and enables distributing dpnp packages with the latest Python version.
Moreover, the release provides compatibility with NumPy 2.3.0 and includes several bug fixes.
matmul tests in case of numpy 2.3.0 due to known NumPy issue #2495dpnp.linalg.norm) of empty arrays when keepdims=True is passed #2477float16 dtype #2483Full Changelog: 0.18.0...0.18.1
This release achieves 100% compliance with Python Array API specification (revision 2024.12).
The release provides enhanced compatibility with NumPy 2.2.5. Window and mathematical routines are complemented by a set of new functions.
Moreover, it adds support to build dpnp from the source for AMD GPUs.
dpnp.hamming #2341, #2357dpnp.hanning #2358dpnp.blackman #2363dpnp.bartlett #2366dpnp.convolve #2205dpnp.kaiser #2387dpnp.bitwise_count #2308dpnp.common_type #2391dpnp.interp #2417dpnp for specified AMD GPU architecture using CodePlay oneAPI plug-in #2302dpnp.nansum, dpnp.nanprod, dpnp.nancumsum, and dpnp.nancumprod by reusing dpnp.nan_to_num function in implementation of the functions #2339uint64 dtype in dpnp.bincount #2361ord={None, 1, 2, inf} and the matrix norms ord={None, 1, 2, inf, "fro", "nuc"} now consistently return zero for empty arrays, which are arrays with at least one axis of size zero. This change affects dpnp.linalg.norm, dpnp.linalg.vector_norm, and dpnp.linalg.matrix_norm. Previously, dpnp would either raise errors or return zero depending on the parameters provided #2371dpnp.fft.fftfreq and dpnp.fft.rfftfreq functions to support dtype keyword per Python Array API spec 2024.12 #2384dpnp.fix to return output with the same data-type of input #2392dpnp.einsum to add support for order=None #24112024.12 #2416einsum_call keyword from dpnp.einsum_path signature #2421dpnp.vdot to return a 0-D array when one of the inputs is a scalar #2295dpnp.outer to return the same dtype as NumPy when multiplying an array with a scalar #2295"max dimensions" to None in array API capabilities #2432i0.hpp to expose cyl_bessel_i0 function depending on build target #2440arg, copysign, i0, and inv from VM namespace to be used by implementation of the appropriate element-wise functions #2445Quick start quide and README #24460.7 #2448axis in dpnp.take_along_axis function has now a default value of -1 #2442Quick Start Guide #2449black configuration with the list of supported python versions #2457pyproject.toml instead of setup.py aligning with current packaging best practices #2462dpnp.linalg.cond docstring about its behavior with singular matrices #2460dpnp.erf #2378conda create commands build and install instructions of Quick start guide to avoid a compilation error #2395False value #2415dpnp.i0 and dpnp.kaiser #2439dpnp.linalg.LinAlgError exception raised on singular input matrices for both non-batched and batched cases in dpnp.linalg.inv [#2458] (#2458)numpy.ndarray for comparison [#2467] (#2467)Full Changelog: 0.17.0...0.18.0