My goal is to assign each pixel of an image, in my case an numpy array, the frequency of the bin it falls into. For example, I have a values like [0.5, 1, 2, 2, 4]
[0.5, 1, 2, 2, 4]