Re: Initial kw behaviour for cumulative_trapezoid

"Praveer Nidamaluri" <[email protected]>
Newsgroups gmane.comp.python.scientific.devel
Message-ID <[email protected]>
Thanks Ralf,
As you noted, the only current logical uses for initial are initial=None and initial=0. The numerical values for these would be the same if we prepend and sum. Prepending and summing would also make all other values for `initial` correct and usable as well.

But, I would be good with what you suggested as well: only provide the options for 0 and None. 
This would explicitly make the purpose of the `initial` kw to match the lengths of the input and output.

Would raising an exception be too strong of a change though? 
What about: 
if `initial` is not None: initial is taken as 0.
A warning can then be provided if initial is not 0 or None to ensure it is not a silent change.

I can put up a PR based on whatever is the final consensus and make cumulative_simpson have the same behaviour.
_______________________________________________
SciPy-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-dev.python.org/
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.