[Numpy-discussion] What is the logical value of nan?

Pearu Peterson pearu at cens.ioc.ee
Wed Mar 11 02:52:07 EDT 2009


On Wed, March 11, 2009 7:50 am, Christopher Barker wrote:

>  > > Python does not distinguish between True and
>  > > False -- Python makes the distinction between something and nothing.
>
> In that context, NaN is nothing, thus False.

Mathematically speaking, NaN is a quantity with undefined value. Closer
analysis of a particular case may reveal that it may be some finite number,
or an infinity with some direction, or be intrinsically undefined.
NaN is something that cannot be defined because its value is not unique.
Nothing would be the content of empty set.

Pearu




More information about the NumPy-Discussion mailing list