Hello,
I´ve got this problem with pickle, it seems it doesn´t handle
correctly infinite values (nor does Python return overflow/underflow
error). What could I do about it? Example code:
<type 'float'>
1.#INF
[...]
ValueError: invalid literal for float(): 1.#INF
I´ve got this problem with pickle, it seems it doesn´t handle
correctly infinite values (nor does Python return overflow/underflow
error). What could I do about it? Example code:
>>x = 1e310 #actually it would be a result of calculations
>>type(x)
>>type(x)
>>x
>>import pickle
>>pickle.loads( pickle.dumps(x) )
>>pickle.loads( pickle.dumps(x) )
ValueError: invalid literal for float(): 1.#INF
Comment