[SciPy-user] nan bug in distributions.norm.cdf
Thu Feb 22 11:15:29 CST 2007
Christopher Fonnesbeck wrote:
> For some reason, perfectly valid normal random variates return a nan
> when passed to the normal cdf in the stats.distributions package:
> In : from scipy.stats import distributions as d
> In : d.norm.cdf(-0.73646593092)
> Out: array(nan)
> In : d.norm.cdf(-0.7)
> Out: array(0.24196365222307303 )
> In : d.norm.cdf(-0.8)
> Out: array(0.21185539858339669)
> Simply rounding this value makes it work. Not sure why this happens.
> Using a relatively recent svn build on OSX.
Current SVN on Intel OS X:
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy import stats
"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