def inverseHistogram(hist, bin_range):
data = hist.astype(float) / np.min(hist[np.nonzero(hist)])<EOL>new_data = np.empty(shape=np.sum(data, dtype=int))<EOL>i = <NUM_LIT:0><EOL>xvals = np.linspace(bin_range[<NUM_LIT:0>], bin_range[<NUM_LIT:1>], len(data))<EOL>for d, x in zip(data, xvals):<EOL><INDENT>new_data[i:i + d] = x<EOL>i += int(d)<EOL><DEDENT>return new_data<EOL>
sample data from given histogram and min, max values within range

    Returns:
        np.array: data that would create the same histogram as given