[SciPy-dev] Anybody to confirm a result in scipy.stats.distributions

Robert Kern robert.kern at gmail.com
Tue Jul 14 23:06:04 EDT 2009


On Tue, Jul 14, 2009 at 21:51, Pierre GM<pgmdevlist at gmail.com> wrote:
> All,
> Could anybody in/confirm the following result ? (scipy 0.8.0.dev5845),
>
>  >>> import scipy.stats.distributions as dist
>  >>> dist.gamma(4.).cdf(dist.gamma(4.).ppf(0.25))
> 0.0

I can confirm the bug. special.gammaincinv(x,y) appears to not like
y=0.25 for any x, but any other y seems to be fine.

These are suggestive lines in c_misc/gammaincinv.c:

    if (a <= 0.0 || y <= 0.0 || y > 0.25) {
        return cephes_igami(a, 1-y);
    }

    double flo = -y, fhi = 0.25 - y;

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the SciPy-Dev mailing list