[Numpy-discussion] Re: Add to NumPy a function to compute cumulative sums from 0.

2023-08-18 Thread Ronald van Elburg
Ilhan Polat wrote: > I think all these point to the missing convenient functionality that > extends arrays. In matlab "[0 arr 10]" nicely extends the array to a new > one but in NumPy you need to punch quite some code and some courage to > remember whether it is hstack or vstack or concat or block

[Numpy-discussion] Re: Add to NumPy a function to compute cumulative sums from 0.

2023-08-18 Thread Ronald van Elburg
I was trying to get a feel for how often the work around occurs. I found three clear examples in Scipy and one unclear case. One case in holoviews. Two in numpy. One from soundappraisal's code base. Next to prepending to the output, I also see prepending to the input as a workaround. Some exam

[Numpy-discussion] Re: Add to NumPy a function to compute cumulative sums from 0.

2023-08-18 Thread Ralf Gommers
On Fri, Aug 18, 2023 at 10:59 AM Ronald van Elburg < r.a.j.van.elb...@hetnet.nl> wrote: > I was trying to get a feel for how often the work around occurs. I found > three clear examples in Scipy and one unclear case. One case in holoviews. > Two in numpy. One from soundappraisal's code base. > Th

[Numpy-discussion] Re: Add to NumPy a function to compute cumulative sums from 0.

2023-08-18 Thread Ronald van Elburg
> Whether it's necessary to have other keywords to prepend anything other > than zero, or append rather than prepend, is a lot less clear. Did you find > a clear need for those things? No, I haven't found them. For streaming data there might be usecases for starting with an initial offset, but I

[Numpy-discussion] Re: Add to NumPy a function to compute cumulative sums from 0.

2023-08-18 Thread Warren Weckesser
On Fri, Aug 18, 2023 at 4:59 AM Ronald van Elburg < r.a.j.van.elb...@hetnet.nl> wrote: > I was trying to get a feel for how often the work around occurs. I found > three clear examples in Scipy and one unclear case. One case in holoviews. > Two in numpy. One from soundappraisal's code base. > See