Numpy method for C = A * B where A is a (a,) vector, B is a (b,c) matrix, and C is a (a, b, c) tensor
import numpy as np
a = np.array([7,8,9])
b = np.array([[1,2,3],[4,5,6]])
c = a[:,np.newaxis].dot(b.flatten()[np.newaxis, :])
c.reshape(a.shape[0], b.shape[0], b.shape[1])