You’ll have to reason about exactly what you want the math to be doing, but this “align, multiply, sum” recipe lets you do dot-products between conformable dimensions of arbitrary nd-arrays, yes. You’re basically doing np.einsum.
1 Like