I believe that numpy.histogram returns the bin edges not the bin centers, you can do `(edge[1:] + edges[:-1]) / 2` to get the centers.