outer
outer(u, v)
Input: u, v · Output: no output
What it is
Outer product u·vᵀ: a len(u)×len(v) Mat of u[i]·v[j], whatever the orientation of the two vectors. Empty or complex input is an error.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
outer(u, v) | u Mat or vectornot documented yetv Mat or vectornot documented yet | not documented yet | Empty or complex input is an error. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
# `grid` does not depend on `p`, so building it per call is waste.
grid = outer(f, t) # K x N, built ONCE
shape(p) := sum(A .* cos(grid + p), axis = 0)
from numerics-dsp