Solved by ptrblck in post #2 
              
              
                The difference is caused in the large number in hist[0] and hist2[0]. 
The default float32 dtype can represent integers between 0 and 16777216 exactly but starts to round for larger (or smaller negative integers) as: 

Integers between 2**24=16777216 and 2**25=33554432 round to a multiple of 2 (even…