[SciPy-user] nan bug in distributions.norm.cdf

Bryan Van de Ven bryanv@enthought....
Thu Feb 22 10:56:21 CST 2007


I just tried this on OSX (Intel MacBook, Darwin) and I don't see the 
problem:

In [1]: from scipy.stats import distributions as d

In [2]: d.norm.cdf(-0.73646593092)
Out[2]: array(0.23072359685139249)

In [3]: import scipy

In [4]: scipy.__version__
Out[4]: '0.5.3.dev2409'

What platform/version are you using?


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 [10]: from scipy.stats import distributions as d
> ...
> In [31]: d.norm.cdf(-0.73646593092)
> Out[31]: array(nan)
> 
> In [32]: d.norm.cdf(-0.7)
> Out[32]: array(0.24196365222307303 )
> 
> In [33]: d.norm.cdf(-0.8)
> Out[33]: array(0.21185539858339669)
> 
> Simply rounding this value makes it work. Not sure why this happens. 
> Using a relatively recent svn build on OSX.
> 
> cf
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user



More information about the SciPy-user mailing list