[SciPy-dev] scipy.special.hyp2f1 bug?
Wed Sep 16 20:02:41 CDT 2009
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)
In : special.hyp2f1(3,-1,-1,.5)
In : mpmath.hyp2f1(1,1,4,3+4j)
Out: mpc(real='0.49234384000963544', imag='0.60513406166123973')
In : special.hyp2f1(1,1,4,3+4j)
I will file a bug report shortly, if we think mpmath is correct vs. scipy.
More information about the Scipy-dev