latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.outer
- tensorplay.functional.outer(input, vec2, *, out=None) Tensor[source]
Outer product of
inputandvec2. Ifinputis a vector of size andvec2is a vector of size , thenoutmust be a matrix of size .Note
This function does not broadcast.
- Parameters:
- Keyword Arguments:
out (Tensor, optional) – optional output matrix
Example:
>>> v1 = tensorplay.arange(1., 5.) >>> v2 = tensorplay.arange(1., 4.) >>> tensorplay.outer(v1, v2) tensor([[ 1., 2., 3.], [ 2., 4., 6.], [ 3., 6., 9.], [ 4., 8., 12.]])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

