NaN comparisons - Call For Anecdotes

Chris Angelico rosuav at gmail.com
Thu Jul 17 14:55:40 EDT 2014


On Fri, Jul 18, 2014 at 4:49 AM, Johann Hibschman <jhibschman at gmail.com> wrote:
> Chris Angelico <rosuav at gmail.com> writes:
>
>> But you also don't know that he hasn't. NaN doesn't mean "unknown", it
>> means "Not a Number". You need a more sophisticated system that allows
>> for uncertainty in your data.
>
> Regardless of whether this is the right design, it's still an example of
> use.

Sure it is. And you may well have earned yourself that beer. But I
don't put too much stock in hacks, at least as regards design
decisions elsewhere. It's a little dubious when you grant special
meaning to things and then use that meaning to justify the things'
semantics. I'd much rather find an example where, for instance,
numerical calculations might overflow to +inf or -inf, and then
further calculations can result in a nan, etc, etc. Those are the
sorts of examples that you'd find among SciPy users and such.

ChrisA



More information about the Python-list mailing list