[SciPy-Dev] adding trapezoidal integration equivalent to logsumexp

Thomas Haslwanter thomas.haslwanter at gmail.com
Thu Feb 4 13:15:03 EST 2016


Why don't you use CDF?
On Feb 4, 2016 3:22 PM, "Matthew Pitkin" <matthew.pitkin at glasgow.ac.uk>
wrote:

> Dear SciPy-dev list,
>
> I often require using trapezoidal integration of probability distribution
> functions (pdfs). For numerical reasons it is generally best to compute the
> logarithm of the pdfs, so integrating them whilst staying in log-space is
> generally required. Provided the steps between points are equal the
> scipy.misc.logsumexp function can be used for this, but I was wondering if
> a function specifically for this purpose (and following the usage of
> scipy.integrate.trapz function) might be more generally useful (called e.g.
> logtrapz)? I have my own code to do this, so if the list thinks this could
> be useful I can add it into scipy and create a pull request.
>
> Regards,
>
> Matt
>
> --
> -----------------------------------------------------------
> Matthew Pitkin
> School of Physics and Astronomy
> Kelvin Building
> University of Glasgow
> Glasgow, G12 8QQ
>
> Tel. no.  +44 (0)141 330 7168
> Mob. no.  +44 (0)774 050 7792
> e-mail    matthew.pitkin at glasgow.ac.uk
> http://www.astro.gla.ac.uk/~matthew
> -----------------------------------------------------------
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20160204/3085c1f3/attachment.html>


More information about the SciPy-Dev mailing list