I need to multiply an array by another array element-wise, just like the Hadamard product of vectors in math. For example:
A = [1,2,3,4]
B = [2,3,4,5]
C = A*B = [2,6,12,20]
I can't even figure out the code, I've tried doing so element by element but this seems too messy of a solution for me, any ideas?
See Question&Answers more detail:os