[Numpy-discussion] Row-wise dot product?

T J tjhnson at gmail.com
Mon Sep 7 05:34:16 EDT 2009


Is there a better way to achieve the following, perhaps without the
python for loop?

>>> x.shape
(10000,3)
>>> y.shape
(10000,3)
>>> z = empty(len(x))
>>> for i in range(10000):
...    z[i] = dot(x[i], y[i])
...



More information about the NumPy-Discussion mailing list