def hist_range(array, bins):
    """ Compute the histogram range of the values in the array.*

    Parameters
    ----------
    array: array
        the input data.
    bins: int
        the number of histogram bins.

    Returns
    -------
    range: 2-uplet
        the histogram range.
    """
    s = 0.5 * (array.max() - array.min()) / float(bins - 1)
    return (array.min() - s, array.max() + s)