Skip to main content
Log in

Mojo function

outer

outer(lhs: Symbol, rhs: Symbol) -> Symbol

Computes the outer product of two symbolic vectors.

Args:

  • lhs (Symbol): The left side of the product. Whatever its shape, it will be flattened to a rank-1 vector.
  • rhs (Symbol): The right side of the product. Whatever its shape, it will be flattened to a rank-1 vector. Must have the same number of elements as lhs.

Returns:

A symbolic tensor representing the outer product of the two input vectors. It will have rank 2, with the dimension sizes being the number of elements of lhs and rhs respectively.

Was this page helpful?