def rescale(data):
    """
    Returns a copy of data that has been linearly mapped to the interval 0-1
    """
    data_max, data_min = data.max(), data.min()
    data -= data_min
    data /= data_max - data_min
    return data
