Suppose I have the following two arrays:
X = np.array([[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.]])
B = np.array([[2, 4, 6],
[2, 4, 6],
[2, 4, 6],
[2, 4, 6]])
I want to compute a row wise matrix multiplication such that the output is:
y = np.array([28, 28, 28, 28])
, i.e. each element in y is something like np.array([1, 2, 3]) dot np.array([2, 4, 6]) = 28
Is this possible?