awkward icon indicating copy to clipboard operation
awkward copied to clipboard

ak.cumsum

Open nsmith- opened this issue 2 years ago • 3 comments

Description of new feature

An awkward-array equivalent of np.cumsum seems useful. For example, for a : N * var * whatever, ak.local_index(a, axis=1) could be implemented as ak.cumsum(ak.ones_like(a), axis=1) - 1.

nsmith- avatar Aug 28 '23 23:08 nsmith-

Yes, cumsum is a useful function (and we did think about adding it, see #1362). I'll leave this open, as we should get around to it.

agoose77 avatar Aug 29 '23 08:08 agoose77