[Numpy-discussion] element wise help
Chris Colbert
sccolbert@gmail....
Thu May 7 11:39:38 CDT 2009
suppose i have two arrays: n and t, both are 1-D arrays.
for each value in t, I need to use it to perform an element wise scalar
operation on every value in n and then sum the results into a single scalar
to be stored in the output array.
Is there any way to do this without the for loop like below:
for val in t_array:
out = (n / val).sum() # not the actual function being done, but
you get the idea
Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090507/da61ed12/attachment.html
More information about the Numpy-discussion
mailing list