<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/567" rel="nofollow">http://projects.scipy.org/scipy/ticket/567</a> on 2007-12-18 by trac user cems, assigned to unknown.</em></p>
<p dir="auto">Reproducible bug.</p>
<p dir="auto">version 0.5.2.1-2   from fink<br>
running in ipython, mac ppc G4, 10.4.11</p>
<p dir="auto">description: at many special input values stats.norm.cdf() returns a nan.</p>
<p dir="auto">Example:</p>
<p dir="auto">In [308]: stats.norm.cdf(-1.7624320981)<br>
Out[308]: array(0.03899815972020125)</p>
<p dir="auto">In [309]: stats.norm.cdf(-1.7624320982)<br>
Out[309]: array(nan)</p>
<p dir="auto">In [310]: stats.norm.cdf(-1.7624320983)<br>
Out[310]: array(nan)</p>
<p dir="auto">In [311]: stats.norm.cdf(-1.7624320984)<br>
Out[311]: array(0.038998159694008439)</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/540" rel="nofollow">http://projects.scipy.org/scipy/ticket/540</a> on 2007-11-17 by trac user emv, assigned to unknown.</em></p>
<p dir="auto">Very strange: norm.cdf returns nan for no particular reason, and with no visible pattern. Some particular combinations of parameters cause this to happen. These combinations are also rare. Example:</p>
<p dir="auto">In [3]: x, l, s = (1.38629436112, 0.950273420309, 0.204423758009)</p>
<p dir="auto">In [4]: from scipy.stats.distributions import *</p>
<p dir="auto">In [5]: norm.cdf(x, loc=l, scale=s)<br>
Out[5]: array(nan)</p>
<p dir="auto">BUT changing the values even slightly causes the problem to disappear.</p>
<p dir="auto">In [6]: norm.cdf(x, loc=l, scale=s-.01)<br>
Out[6]: array(0.98753972245290123)</p>
<p dir="auto">In [7]: norm.cdf(x, loc=l, scale=s+.01)<br>
Out[7]: array(0.97899668351739855)</p>
<p dir="auto">In [10]: norm.cdf(x-.5, loc=l, scale=s)<br>
Out[10]: array(0.3771506947259281)</p>