You can pass a function to unique
in order to get the indices of the unique elements:
idx = unique(z -> x[z], 1:length(x))
x[idx]
You can pass a function to unique
in order to get the indices of the unique elements:
idx = unique(z -> x[z], 1:length(x))
x[idx]