Closed cbespin closed 7 years ago
I don't think this is an issue. In C, a scalar is treated as follows:
6.3.1.2 Boolean type When any scalar value is converted to _Bool, the result is 0 if the value compares equal to 0; otherwise, the result is 1.
So 0 is equal to (==) false, 1 is equal to true and any number that is not false (0) evaluates to true.
C++ and Python have the same behavior.
0==False # true
1==True # true
2==True # false
It is c after a numba type check and conversion and this is not defined anywhere. Even if this is not an issue now, it makes the code less read able.
assigned_hit_array
is boolean after init, but treated as an integer array in_cluster_hits
.