[SciPy-Dev] special cephes versus cdflib

Robert Kern robert.kern at gmail.com
Fri Oct 4 07:26:36 EDT 2013


On Fri, Oct 4, 2013 at 1:44 AM, <josef.pktd at gmail.com> wrote:
>
> looking for the source for the cdf of the f-distribution
>
> it's in cephes not in cdflib
> https://github.com/scipy/scipy/issues/2958#issuecomment-25668797
> (after reading 3 fortran files to see where df>= 1 is imposed. It's
> not, in cdflib)
>
>
> Is there a pattern whether a `special` function is from cephes or cdflib?
> If a function exists in cephes, is it used instead of the one from the
cdflib?

I believe that CDFLIB was added to scipy later than cephes, so I expect
that for most of the duplicates, the cephes one would be the one exposed in
scipy.special. But there is no firm guideline here, since some of the
CDFLIB versions may have been chosen for better behavior (like perhaps
should be the case here). You always need to check generate_ufuncs.py to
track down the implementation.

> Is there a backdoor to access the (duplicate) cdflib function from python?

No. You will have to wrap it yourself if you want it. Switching the
implementation used in scipy.special.fdtr() should be straightforward if
you want to do so. The wrapper cdff1_wrap() is there in cdf_wrappers.c,
just commented out.

--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20131004/fe89d2c6/attachment.html>


More information about the SciPy-Dev mailing list