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. Parameteroutis supported asdpnp.ndarrayand as default valueNone. Input array data types are limited by supported DPNP Data types.See also
dpnp.vdotComplex-conjugating dot product.
dpnp.tensordotSum products over arbitrary axes.
dpnp.einsumEinstein summation convention.
dpnp.dotAlternative 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]])