def compute_edges(edges):
    widths = np.diff(edges)
    if np.allclose(widths, widths[0]):
        width = widths[0]
    else:
        raise ValueError('Centered bins have to be of equal width.')
    edges -= width/2.
    return np.concatenate([edges, [edges[-1]+width]])
Computes edges from a number of bin centers,
dataset/ETHPy150Open ioam/holoviews/holoviews/element/util.py/compute_edges