The Data Parallel Extension for NumPy* (dpnp package) - a library that implements a subset of NumPy* that can be executed on any data parallel device. The subset is a drop-in replacement of core NumPy* functions and numerical data types.

The Data Parallel Extension for NumPy* is being developed as part of Intel AI Analytics Toolkit and is distributed with the Intel Distribution for Python*. The dpnp package is also available on Anaconda cloud. Please refer the Quick Start Guide page to learn more.

Being drop-in replacement for NumPy* means that the usage is very similar:

>>> import dpnp as np

The dpnp.ndarray class is a compatible alternative of numpy.ndarray.

>>> x = np.array([1, 2, 3])

x in the above example is an instance of dpnp.ndarray that is created identically to NumPy*’s one. The key difference of dpnp.ndarray from numpy.ndarray is that the memory is allocated on the default SYCL* device, which is a "gpu" on systems with integrated or discrete GPU (otherwise it is the "host" device on systems that do not have GPU).

Most of the array manipulations are also done in the way similar to NumPy* such as:

>>> s = np.sum(x)

Please see the API Reference for the complete list of supported NumPy* APIs along with their limitations.