Is it possible to reorder the values ββin the vector specified by the index list?
I have two arrays and I want to sort arr2 based on arr1 , which are both pre-allocated.
indices = zeros(length(arr1)) sortperm!(indices, arr1) arr2[indices] <-- this returns a copy
source share