NaN comparisons - Call For Anecdotes

Marko Rauhamaa marko at
Tue Jul 8 19:36:40 CEST 2014

Skip Montanaro <skip at>:

> In addition to what others have written, I will add one thing. There
> are certainly situations where raising an exception is bad. Consider
> all the people in the scientific computing community doing fancy
> linear algebra sorts of things, often with missing data. They
> generally want NaN propagated and not have some long running
> calculation crash in the middle.

Do the scientific computers mind:

    >>> 1 / 0
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ZeroDivisionError: division by zero

or would they prefer their fancy linear-algebraic computation to just
forge on?


More information about the Python-list mailing list