def get_bin_centers(edges):
    """Returns a list of bin centers from a list of np.histogram edges.
    The returned centers are one element shorter than the provided edges list."""
    l = len(edges)
    centers = []
    for idx in range(l - 1):
        center = (edges[idx] + edges[idx + 1]) / 2
        center = float("{:.3f}".format(center))  # limit to three decimals
        centers.append(center)

    return centers