outer

outer(x1: array, x2: array, /) array

Returns the outer product of two vectors x1 and x2.

Parameters:
  • x1 (array) – first one-dimensional input array of size N. Must have a numeric data type.

  • x2 (array) – second one-dimensional input array of size M. Must have a numeric data type.

Returns:

out (array) – a two-dimensional array containing the outer product and whose shape is (N, M). The returned array must have a data type determined by Type Promotion Rules.

Notes

Changed in version 2022.12: Added complex data type support.