Hi, Is there a simple way to get a cumsum in reverse order? So far, the best I've come up with is to use fancy indexing twice to reverse things:
>>> x = np.arange(10)
>>> np.cumsum(x[np.arange(9, -1, -1)])[np.arange(9, -1, -1)]
array([45, 45, 44, 42, 39, 35, 30, 24, 17, 9])
If it matters, I only care about the 1-d case at this point.
Thanks,
Ken
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion
