dpnp.matmul
- dpnp.matmul(x1, x2, out=None, **kwargs)[source]
Matrix product of two arrays.
For full documentation refer to
numpy.matmul
.Limitations
Input arrays are supported as
dpnp.ndarray
. Otherwise the function will be executed sequentially on CPU. Parameterout
is supported asdpnp.ndarray
and as default valueNone
. Input array data types are limited by supported DPNP Data types.See also
dpnp.vdot
Complex-conjugating dot product.
dpnp.tensordot
Sum products over arbitrary axes.
dpnp.einsum
Einstein summation convention.
dpnp.dot
Alternative matrix product with different broadcasting rules.
Examples
>>> import dpnp as np >>> a = np.ones([9, 5, 7, 4]) >>> c = np.ones([9, 5, 4, 3]) >>> np.matmul(a, c).shape (9, 5, 7, 3) >>> a = np.array([[1, 0], [0, 1]]) >>> b = np.array([[4, 1], [2, 2]]) >>> np.matmul(a, b) array([[4, 1], [2, 2]])