On 11 Aug 2023, at 7:52 pm, Robert Kern <robert.kern@gmail.com> wrote:

>>> np.cumsum([[1, 2, 3], [4, 5, 6]])
array([ 1,  3,  6, 10, 15, 21])
which matches your example in the cumsum0() documentation. Did something change in a recent release?

That's not what's in his example.
The example is creating a cumsum-like array of n+1 elements starting with the number 0,
not array[0] – i.e. essentially just inserting 0 along every axis, so that
np.diff(np.cumsum0(a)) = a

Not sure if this would be too complicated to effect with the existing ufuncs either…
Almost all of the documentation sounds very repetitive, so maybe implementing this
via a new kwarg to cumsum would be a better option?