Wednesday 7 August 2013

Comapre `float` and `float64` in python

Comapre `float` and `float64` in python

I've to compare two numbers. One of them comes from regulat python code
and comes other from numpy. Debugger shows they have same value '29.0',
but type of first is float and type of second is float64, so a == b and a
- b == 0 is False. How can I deal with it? I there any way to force
regular python variable to be float64 or numpy use float by default?
UPD: in the end of all this values comes from same file where 29.0 writen,
so I don't think there are some differences in numeric values

No comments:

Post a Comment