[Numpy-discussion] ValueError: invalid literal for float()

Nils Wagner nwagner@iam.uni-stuttgart...
Fri Feb 27 09:20:46 CST 2009

Hi all,

Is it possible to modify the behaviour of float wrt
the following situation

>>> permas_M[0,2]
>>> float(permas_M[0,2])
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ValueError: invalid literal for float(): 

The following works.

>>> permas_M[0,2] = '1.5699999809265137E+01'
>>> permas_M[0,2]
>>> float(permas_M[0,2])


More information about the Numpy-discussion mailing list