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

Christopher Fonnesbeck fonnesbeck.mailing.lists@gmail....
Thu Feb 22 10:45:37 CST 2007


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070222/dafe94e0/attachment.html 


More information about the SciPy-user mailing list