def remove_consecutive_values(maximums):
    """
    Removes the consecutive series in an array(leaving only the first in the series) and returns it.
    Ex. in 1,3,4,5,7,8,9 it would remove 4,5,8,9 
    """
    array_len = len(maximums)
    to_delete = []
    for i in range(array_len):
        next_i = (i+1) % array_len
        if maximums[i]+1 == maximums[next_i]:   
            to_delete.append(True)
        else:
            to_delete.append(False)
    #print to_delete
    no_reps = []
    for i in range(array_len):
        if not to_delete[i]:
            no_reps.append(maximums[i])
    return no_reps