when sort(slow,dims=1)
rows are mixed very denger ! Intuitively sort refers to the table and not each column separately. Is somthing like sortrows in ver 0.6 ?
only
p=sortperm(slow[:,1])
slow[p,:]
wokrs correcttly
Julia Version 1.0.1
Commit 0d71392 (2018-09-29 19:05 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core™ i7-2630QM CPU @ 2.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, sandybridge)
I’m not sure if it’s intuitive that sort should sort the entire row by the first column. To do that, you can use:
sortslices(slow, dims=1)
It sounds like you might be porting Julia 0.6 code to Julia 1.0? You should use Julia 0.7 instead during the transition, since it will tell you how to modify your code:
julia> sortrows(slow)
┌ Warning: `sortrows(A::AbstractMatrix; kws...)` is deprecated, use `sortslices(A, dims=1, kws...)` instead.
...
Once your code runs without deprecation warnings in Julia 0.7, switch to Julia 1.0.
Btw, your sortperm alternative does not produce the same result in case of duplicate entries in the first column (it doesn’t look at other columns to break ties).
Yes, "
Sort a multidimensional array A along the given dimension. See sort! for a description of possible keyword
arguments.
" it is about Array
please use word "for ecach col separatly "!
I would like that too. But there is a lot of data to readddlm () and it’s very slow at 0.7.
eaddlm() 400 sec. vs 15 sec. on 1.0.1
7.0.1 can be very usefull for users
Paul
True ! But version 0.7.1 analigical to 1.0.1 can be very usufull, Plese consider it , in next version will be meny amendments. For evry 1.0.x > 0.7.x
Paul
That sounds like something you can work around? For example, for the purpose of upgrading your code, could you not run it with a slightly smaller dataset than 5 million entries?
Then complete the transition as quickly as possible with Julia 0.7 (no deprecation warnings), then switch to Julia 1.0.1.
Apparently sortslices can be a bit inefficient, but didn’t that also apply to sortrows in Julia 0.6? Perhaps you should stick with sortperm then, if that works for you. (Just consider if you need to support identical values in the first column.)