NaN comparisons - Call For Anecdotes

Marko Rauhamaa marko at pacujo.net
Tue Jul 8 13:36:40 EDT 2014


Skip Montanaro <skip at pobox.com>:

> 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?


Marko



More information about the Python-list mailing list