dpnp.outer
- dpnp.outer(a, b, out=None)[source]
Returns the outer product of two arrays.
For full documentation refer to
numpy.outer
.- Parameters:
a ({dpnp.ndarray, usm_ndarray}) -- First input vector. Input is flattened if not already 1-dimensional.
b ({dpnp.ndarray, usm_ndarray}) -- Second input vector. Input is flattened if not already 1-dimensional.
out ({None, dpnp.ndarray, usm_ndarray}, optional) -- A location where the result is stored
- Returns:
out -- out[i, j] = a[i] * b[j]
- Return type:
dpnp.ndarray
See also
dpnp.einsum
Evaluates the Einstein summation convention on the operands.
dpnp.inner
Returns the inner product of two arrays.
dpnp.tensordot
dpnp.tensordot(a.ravel(), b.ravel(), axes=((), ())) is the equivalent.
Examples
>>> import dpnp as np >>> a = np.array([1, 1, 1]) >>> b = np.array([1, 2, 3]) >>> np.outer(a, b) array([[1, 2, 3], [1, 2, 3], [1, 2, 3]])