[Numpy-discussion] Is there a way to reset an accumulate function?

Cera, Tim tim at cerazone.net
Tue Oct 23 13:11:44 EDT 2012

I have an array that is peppered throughout in random spots with 'nan'.  I
would like to use 'cumsum', but I want it to reset the accumulation to 0
whenever a 'nan' is encountered.  Is there a way to do this?  Aside from a
loop - which is what I am going to setup here in a moment.

Kindest regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20121023/ea2bbe1d/attachment.html>

More information about the NumPy-Discussion mailing list