Create a program in Python that removes duplicates from a given array.
[1,1,2,3,4,5,5,5]
def remove_duplicates(array):
    new_array = []
    for element in array:
        if element not in new_array:
            new_array.append(element)
    return new_array