[Numpy-discussion] Noncentral chi square

Peck, Jon peck@spss....
Mon May 19 11:33:41 CDT 2008


Message: 1
Date: Mon, 19 May 2008 09:20:21 -0400
From: Neal Becker <ndbecker2@gmail.com>
Subject: [Numpy-discussion] noncentral_chisquare buglet?
To: numpy-discussion@scipy.org
Message-ID: <g0ruqm$ke$1@ger.gmane.org>
Content-Type: text/plain; charset=us-ascii

    def noncentral_chisquare(self, df, nonc, size=None):
        """Noncentral Chi^2 distribution.

        noncentral_chisquare(df, nonc, size=None) -> random values
        """
        cdef ndarray odf, ononc
        cdef double fdf, fnonc
        fdf = PyFloat_AsDouble(df)
        fnonc = PyFloat_AsDouble(nonc)
        if not PyErr_Occurred():
            if fdf <= 1:
                raise ValueError("df <= 0") <<<????

I think this message should be "df <= 1"?

[>>>Peck, Jon] 
Isn't it rather that the message is correct but the test is wrong?  Shouldn't it be 
if fdf <= 0  ?

-Jon Peck


More information about the Numpy-discussion mailing list