[Numpy-discussion] Strange error raised by scipy.special.erf

Nadav Horesh nadavh@visionsense....
Sun Jan 22 04:28:53 CST 2012


With N.seterr(all='raise'):

>>> from scipy import special
>>> import scipy
>>> special.erf(26.6)
1.0
>>> scipy.__version__
'0.11.0.dev-81dc505'
>>> import numpy as N
>>> N.seterr(all='raise')
{'over': 'warn', 'divide': 'warn', 'invalid': 'warn', 'under': 'ignore'}
>>> special.erf(26.5)
1.0
>>> special.erf(26.6)
Traceback (most recent call last):
  File "<pyshell#7>", line 1, in <module>
    special.erf(26.6)
FloatingPointError: underflow encountered in erf
>>> special.erf(26.7)
1.0

What is so special in 26.6?
I have this error also with previous versions of scipy

  Nadav.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120122/444ea5ab/attachment-0001.html 


More information about the NumPy-Discussion mailing list