Hi List,

 I have to sum up an unknown number of ndarrays of the same size. These
arrays, possibly thousands in number, are provided by an iterator. Right now
I use python reduce with operator.add. Does that invoke the corresponding
ufunc internally, I want to avoid creating temporaries. With ufunc I know
how to do it, but not sure how to make use of that in reduce. It is not
essential that I use reduce though, so I would welcome idiomatic and
efficient way of executing this. So far I have stayed away from building an
ndarray object and summing across the relevant dimension. Is that what I
should be doing ?  Different invocations of this function has different
number of arrays, so I cannot pre-compile away this into a numexpr.

Thanks and regards
  srean
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to