def array2points(array):
    """
    Creates a list of pairs (x,y) from an array of y values, to make it
    suitable to be processed by the RDP function.
    """
    return [(i, array[i]) for i in range(len(array))]