To answer your question: vecwill change any array to a 1d vector.
sortpermreturns a permutation, but not the original data; so your example, even if you added vec(xarr), throws the data. You probably want to sort.
Finally, Julia is push!not ineffective. You might expect it to be inefficient from experience with another language (Matlab?), But in Julia you can grow 1d arrays efficiently.
tholy source
share