[SciPy-user] scipy.special.erf randomly returns NANs on OSX

Evan Monroig evan.monroig at gmail.com
Sun Jan 22 00:28:18 CST 2006


Hi,

I have this strange problem that the special erf function returns NANs
when the input is an array:

>>> import scipy,numpy
>>> x = numpy.arange(0., 2., 0.1)
>>> x
array([ 0. ,  0.1,  0.2,  0.3,  0.4,  0.5,  0.6,  0.7,  0.8,  0.9,  1. ,
        1.1,  1.2,  1.3,  1.4,  1.5,  1.6,  1.7,  1.8,  1.9])
>>> scipy.special.erf(x)
array([ 0.        ,  0.11246292,  0.22270259,  0.32862676,  0.42839236,
        0.52049988,  0.60385609,  0.67780119,  0.74210096,  0.79690821,
               nan,  0.88020507,  0.91031398,  0.93400794,  0.95228512,
        0.96610515,  0.97634838,  0.98379046,  0.9890905 ,  0.99279043])
>>> x = numpy.arange(1., 2., 0.1)
>>> scipy.special.erf(x)
array([ 0.84270079,  0.88020507,  0.91031398,  0.93400794,  0.95228512,
        0.96610515,  0.97634838,  0.98379046,  0.9890905 ,  0.99279043])

scipy is 0.4.4.1526, numpy is 0.9.3.1836, I am running on Mac OS X
with MacPython 2.4.1

Can anyone reproduce the problem?

Evan



More information about the SciPy-user mailing list