nums.numpy.outer

nums.numpy.outer(a, b)[source]

Compute the outer product of two vectors.

This docstring was copied from numpy.outer.

Some inconsistencies with the NumS version may exist.

Given two vectors, a = [a0, a1, ..., aM] and b = [b0, b1, ..., bN], the outer product [1]_ is:

[[a0*b0  a0*b1 ... a0*bN ]
 [a1*b0    .
 [ ...          .
 [aM*b0            aM*bN ]]
Parameters
  • a ((M,) BlockArray) – First input vector. Input is flattened if not already 1-dimensional.

  • b ((N,) BlockArray) – Second input vector. Input is flattened if not already 1-dimensional.

Returns

outout[i, j] = a[i] * b[j]

Return type

(M, N) BlockArray

See also

inner, outer, tensordot

Notes

Only single-axis inputs supported.