If you have the memory, it is usually faster to create a new array. Going the other way, if you don't mind the permutation being overwritten, you can use the (unexported) Base.permute!! function. (permute! Makes a copy of the permutation and then calls permute!!.)
Cheers, kevin On Friday, January 10, 2014, andrew cooke wrote: > sounds very much like it would be! thanks! > > On Friday, 10 January 2014 14:09:51 UTC-3, Alex wrote: >> >> Maybe permute!(v,p) is what you are looking for: http://docs.julialang. >> org/en/release-0.2/stdlib/base/?highlight=permute!#Base.permute! >> >> Cheers, >> Alex. >> >> On Friday, 10 January 2014 17:12:08 UTC+1, andrew cooke wrote: >>> >>> is there some efficient way of applying a permutation (in-place)? >>> >>> in other words, i am using sortperm() on one array to find a permutation >>> which i then want to use to in-place sort some data in another array (along >>> a particular dimension). is there a library function that does this? >>> >>> thanks, >>> andrew >>> >>>
