rgommers/scipy — comment on commit aa136e49a819eb735c7b4372dd9fe328b86b6211
File: scipy/integrate/quadrature.py line 246
By WarrenWeckesser:

When `initial` is not None, this code does not use the value of `initial`; it always puts 0 in the initial position, regardless of the value of `initial`:

In [11]: cumtrapz(y, x, initial=0)
Out[11]: array([ 0. , 1.5, 4.5, 6.5])

In [12]: cumtrapz(y, x, initial=1)
Out[12]: array([ 0. , 1.5, 4.5, 6.5])

I would expect the second result to be [1.0, 2.5, 5.5, 7.5].