Bin the values in y based on their x-coordinates
x : array
position
y : array
intensity
nx : integer, optional
number of bins to use
min_x : float, optional
Left edge of first bin
max_x : float, optional
Right edge of last bin
edges : array
edges of bins, length nx + 1
val : array
sum of values in each bin, length nx
count : array
The number of counts in each bin, length nx