Something weird. I want to test if a sum of a tuple elements is 1 and then assert if not.
my_tuple=(0.8,0.2,0)
assert((sum(my_tuple)==1))
This works. It works for other tuples like ( 1,0,0) or (0.1,0.2,0.7). But it raises an error for this tuple (0.7,0.2,0.1) eventhough the sum is clearly 1 !!
Do you have any idea about this ? Thank you