jax.numpy.outer
Warning
This page was created from a pull request (#9655).
jax.numpy.outerΒΆ
- jax.numpy.outer(a, b, out=None)[source]ΒΆ
Compute the outer product of two vectors.
LAX-backend implementation of
outer()
.Original docstring below.
Given two vectors,
a = [a0, a1, ..., aM]
andb = [b0, b1, ..., bN]
, the outer product 1 is:[[a0*b0 a0*b1 ... a0*bN ] [a1*b0 . [ ... . [aM*b0 aM*bN ]]
- Parameters
a ((M,) array_like) β First input vector. Input is flattened if not already 1-dimensional.
b ((N,) array_like) β Second input vector. Input is flattened if not already 1-dimensional.
- Returns
out β
out[i, j] = a[i] * b[j]
- Return type
(M, N) ndarray
References
- 1
: G. H. Golub and C. F. Van Loan, Matrix Computations, 3rd ed., Baltimore, MD, Johns Hopkins University Press, 1996, pg. 8.