This is probably so easy, I'm embarrassed to ask it...but I've been casting around trying things to no avail for the last hour and a half, so here goes...
I have a lot of dot products to take. The length-3 vectors that I want to dot are stacked in a 2D array like this: U = [u1 u2 u3....] and V = [v1 v2 v3....] So both of these arrays, are, say, 3x100 each. I just want to take the dot product of each of the corresponding vectors, so that the result is [u1.v1 u2.v2 u3.v3 ....] which would be a 1x100 array in this case. Which function do I need to use? I thought tensordot() was the one, but I couldn't make it work....pure user error I'm sure.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion