Ivan Vinogradov wrote:
> > <snip>
> > NaNs are handled.
>
> Throwing an exception would be nice in regular Python (non-scipy).
>
> This works to catch NaN on OSX and Linux:
>
> # assuming x is a number
> if x+1==x or x!=x:
>       #x is NaN

x != x works, but:

>>> x = 1e100
>>> x + 1 == x
True

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to