[Numpy-discussion] numpy.put as increment?
wright at esrf.fr
Wed Nov 28 03:17:31 EST 2007
I am trying to sum points onto a 3d grid using "put" with a list of
computed array indices. I am looking for a version of "put" which
increments, e.g. replace:
for i in ind: a.flat[i] = v[i]
with "+=" to increment. Other operations might also be useful?
I tried using "take", then incrementing the result, but still have
problems if the indices are not unique.
Thanks for any suggestions,
More information about the NumPy-Discussion