Is it possible to set an element of an array to NaN in Python?
NaN
Additionally, is it possible to set a variable to +/- infinity? If so, is there any funct
When using Python 2.4, try
inf = float("9e999") nan = inf - inf
I am facing the issue when I was porting the simplejson to an embedded device which running the Python 2.4, float("9e999") fixed it. Don't use inf = 9e999, you need convert it from string. -inf gives the -Infinity.
float("9e999")
inf = 9e999
-inf
-Infinity