outer_op
utils.outer_op(a, b, op=lambda x, y: x * y)
Computes the outer operation of two vectors, a generalisation of the outer product. Wowza
Parameters
a |
ArrayLike |
Array of the first vector. Assumed shape (n,) |
required |
b |
ArrayLike |
Array of the second vector. Assumed shape (m,) |
required |
op |
Callable |
A jit-function acting on an element of vec1 and an element of vec2. By default, this is the outer product. |
lambda x, y: x * y |
Returns
result |
ArrayLike |
The matrix of the result of applying operation to every pair of elements from the two vectors. Return shape (n, m). |