[Numpy-discussion] Sum of the product of three or more arrays
Geoffrey Zhu
zyzhu2000@gmail....
Thu Oct 18 18:07:46 CDT 2007
I think I figured out: sum(X*Y*Z).
Never mind.
On 10/18/07, Geoffrey Zhu <zyzhu2000@gmail.com> wrote:
> Hi All,
>
> Given three vectors of the same lengths, X, Y, and Z, I am looking for
> an efficient way to calculate the following:
>
> sum(x[i]*y[i]*z[i], for i=1..n )
>
>
> I am not sure if there is a vectorized way to do this.
>
> Thanks,
> Geoffrey
>
More information about the Numpy-discussion
mailing list