dpnp.outer
- dpnp.outer(x1, x2, out=None)[source]
Returns the outer product of two arrays.
For full documentation refer to
numpy.outer.Limitations
Parameters x1 and x2 are supported as either scalar,
dpnp.ndarrayordpctl.tensor.usm_ndarray, but both x1 and x2 can not be scalars at the same time. Otherwise the functions will be executed sequentially on CPU. Input array data types are limited by supported DPNP Available array data types.See also
dpnp.einsumEvaluates the Einstein summation convention on the operands.
dpnp.innerReturns the inner product of two arrays.
Examples
>>> import dpnp as np >>> a = np.array([1, 1, 1]) >>> b = np.array([1, 2, 3]) >>> result = np.outer(a, b) >>> [x for x in result] array([[1, 2, 3], [1, 2, 3], [1, 2, 3]])