Basically, s_{i,j} = a_i + b_j
s_{i,j} = a_i + b_j
if n=len(a) and m=len(b), then s.shape is (n,m). Thus, the addition a
n=len(a)
m=len(b)
s.shape
(n,m)
Yes, there actually is. numpy ufuncs have an outer method:
numpy
outer
s = np.add.outer(a, b)