NaN in Numerical

jepler epler jepler.lnk at lnk.ispi.net
Tue May 2 04:34:22 CEST 2000


On Mon, 01 May 2000 19:30:06 GMT, Huaiyu Zhu
 <hzhu at rocket.knowledgetrack.com> wrote:
>How to save and load a matrix containing NaN in the Numeric module?
>Matlab/Octave treat these the same way as numbers.
>In Python I use eval to load, which treats NaN as unknown variable name.

Well, why not:

NaN = math.exp(1000) / math.exp(1000)   # The first way I found to produce NaN
					# on my system

>>> print eval("NaN")
nan

Jeff



More information about the Python-list mailing list