Is there a more efficient way (without loops) to do this with Numpy ?:
for i, x in enumerate(array1):
for j, y in enumerate(array2):
result[i, j] = x y
I was trying to use einsum without success yet.
Thank you !
CodePudding user response:
Simply use broadcasting with an extra dimension:
result = array1[:,None] array2