[SciPy-dev] scipy.special.hyp2f1 bug?
Wed Sep 16 20:15:56 CDT 2009
On Wed, Sep 16, 2009 at 9:02 PM, Skipper Seabold <firstname.lastname@example.org> wrote:
> Since y'all are looking at the distributions vs. mpmath, it reminded
> me of this. I haven't filed a bug report yet, but I don't think one
> existed when I found this.
> I was working with the connection between the incomplete beta function
> and the hypergeometric2f1 function in scipy.special for GLM in
> statsmodels and I came across this blog post on mpmath about some
> corner cases for the hypergeometric2f1.
> Two examples of discrepancies.
> In : import mpmath
> In : from scipy import special
> In : mpmath.hyp2f1(3,-1,-1,0.5)
> Out: mpf('2.5')
> In : special.hyp2f1(3,-1,-1,.5)
> Out: 8.0
> In : mpmath.hyp2f1(1,1,4,3+4j)
> Out: mpc(real='0.49234384000963544', imag='0.60513406166123973')
> In : special.hyp2f1(1,1,4,3+4j)
> Out: (0.65925460474847919+1.3277887264473263j)
> I will file a bug report shortly, if we think mpmath is correct vs. scipy.
there is a ticket for special.hyp2f1 for values that are used in rdist:
but the parameter values in your case look different.
> Scipy-dev mailing list
More information about the Scipy-dev