[SciPy-user] Strange discontinuity in noncentral chisquare
Thu May 28 14:03:25 CDT 2009
On Thu, May 28, 2009 at 13:53, <email@example.com> wrote:
> On Thu, May 28, 2009 at 1:56 PM, Neal Becker <firstname.lastname@example.org> wrote:
>> def pmiss2 (x, esnodB, N):
>> esno = 10**(0.1 * esnodB) * N
>> var = 1/esno
>> _lambda = 1/(0.5*var)
>> return ncx2.cdf (x, 2, _lambda)
>> x = np.arange (0, 50, 0.1)
>> p1 = [pmiss2 (e, 3.5, 24) for e in x]
>> What's with this strange discontinuity?
>> print p1:
> This must be a bug in scipy.special.chndtr
I notice the following snippets of code, which appear guilty:
C .. Statement Functions ..
C .. Statement Function definitions ..
qsmall(xx) = sum .LT. 1.0D-20 .OR. xx .LT. eps*sum
# That is a feature of Fortran I knew nothing about.
60 IF (qsmall(term)) GO TO 80
80 cum = sum
"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-user