Closed jason-neal closed 7 years ago
If the vectors are atleast 2d with shapes like A.shape = (2,3,1)
and B.shape= (7,1)
can transpose them to broad cast out the one (numpy does this when they are on the right)
(A.T * B.T).T).shape = (2,3,7)
which would be the same as
A * B[:,:, np.newaxis]
broadcast the alpha parameter for the combined modeling.
something like xy = x + y[:, np.newaxis] * alpha
will result in shape(len(x), len(alpha))