[PYTHON MATRIX-SIG] Handling null data points

Konrad Hinsen hinsen@ibs.ibs.fr
Wed, 8 Jan 1997 19:08:57 +0100


> NaN sounds interesting - at the moment I just use 1e20. This works fine
> for me as I only have to handle vectors of floats but it would be nice
> to have a solution that would be applicable to other data types. 

NaN is part of the IEEE float format specification, so it wouldn't be
available for anything but floats. There's also infinity (positive
and negative) as a special value. But it is somewhat risky to use
them as "no data" identifiers because some functions return them
as error indicators (e.g. sqrt(-1) is NaN). You would never know
whether a certain data item is unknown or the result of an undefined
operation.

-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================