I am storing 3d coordinates in three arrays. Below follows an example of a total of four entries of coordinate points, of the coordinates (1,2,3), (2,3,4) and (3,4,5), where the first coordinate point is duplicated.
x = [1, 2, 3, 1]
y = [2, 3, 4, 2]
z = [3, 4, 5, 3]
Now, I would like to as efficiently as possible remove duplicate coordinates, such that the above arrays result in
x_prime = [1, 2, 3]
y_prime = [2, 3, 4]
z_prime = [3, 4, 5]
...still containing the same coordinates (1,2,3), (2,3,4) and (3,4,5) however with no duplicate entry of (1,2,3)