Torgil Svensson wrote:

> This seems to indicate that float('nan') works on some platforms but
> str(nan) isn't. Is this true on Linux? Could anyone confirm this? What
> about float('inf') and repr(inf) on Linux?

On Ubuntu Feisty (amd64) Linux (but this behavior has been the same for 
at least the 6 years I can remember.):

$ python
Python 2.5.1 (r251:54863, May  2 2007, 16:27:44)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> float('nan')
nan
 >>> float('inf')
inf
 >>> import numpy
 >>> repr(numpy.inf)
'inf'
 >>> repr(numpy.nan)
'nan'
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to