[SciPy-dev] bug in scipy.stats.norm.cdf ?
John Hunter
jdh2358 at gmail.com
Sun Mar 4 16:53:32 EST 2007
I was surprised by the nans in the cdf output below; ditto for the
survival function which is probably using the same code (svn scipy
compiled for OS X panther python2.3)
In [1]: import scipy
In [2]: import scipy.stats
In [3]: scipy.__version__
Out[3]: '0.5.3.dev2818'
In [4]: distribution = scipy.stats.norm(loc=0, scale=1)
In [5]: x = scipy.arange(-3,3,0.1)
In [6]: distribution.cdf(x)
Out[6]:
array([ 0.0013499 , 0.00186581, 0.00255513, 0.00346697, 0.00466119,
nan, 0.00819754, 0.01072411, 0.01390345, 0.01786442,
nan, 0.02871656, 0.03593032, 0.04456546, 0.05479929,
nan, 0.08075666, 0.09680048, 0.11506967, 0.13566606,
nan, 0.18406013, 0.2118554 , 0.24196365, 0.27425312,
nan, 0.34457826, 0.38208858, 0.42074029, 0.46017216,
0.5 , 0.53982784, 0.57925971, 0.61791142, 0.65542174,
0.69146246, 0.72574688, 0.75803635, 0.7881446 , 0.81593987,
0.84134475, 0.86433394, 0.88493033, 0.90319952, 0.91924334,
0.9331928 , 0.94520071, 0.95543454, 0.96406968, 0.97128344,
0.97724987, 0.98213558, 0.98609655, 0.98927589, 0.99180246,
0.99379033, 0.99533881, 0.99653303, 0.99744487, 0.99813419])
John-Hunters-Computer:~> uname -a
Darwin John-Hunters-Computer.local 7.9.0 Darwin Kernel Version 7.9.0:
Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC
Power Macintosh powerpc
More information about the SciPy-Dev
mailing list