Edit the following Python code to remove duplicate values in the given array.
arr = [1, 2, 4, 2, 5, 4]
arr = [1, 2, 4, 5]
 
unique_arr = []
 
for element in arr:
    if element not in unique_arr:
        unique_arr.append(element)
 
print(unique_arr) # [1, 2, 4, 5]