Open roflmaostc opened 3 months ago
There's definitely a bug here.
I think it's that sortperm
sometimes does not error on sortperm(::Vector{<:Integer}; dims::Int)
. None of the other sort methods support sorting vectors with dims
set.
Yes, it doesn't error if it goes to this case https://github.com/JuliaLang/julia/blob/065d4567e771af1a642f14c482dd85b3240ec0f3/base/sort.jl#L1907
If dims=1
is explicitly provided, it errors sometimes
This bug is present on 1.9 but not 1.8. In 1.8, both error with
ERROR: MethodError: no method matching sortperm(::Vector{Int64}; dims=1)
Closest candidates are:
sortperm(::AbstractVector; alg, lt, by, rev, order) at sort.jl:904 got unsupported keyword argument "dims"
sortperm(::AbstractUnitRange) at range.jl:1384 got unsupported keyword argument "dims"
sortperm(::AbstractRange) at range.jl:1385 got unsupported keyword argument "dims"
Stacktrace:
[1] kwerr(::NamedTuple{(:dims,), Tuple{Int64}}, ::Function, ::Vector{Int64})
@ Base ./error.jl:165
[2] top-level scope
@ REPL[1]:1
But it should work by design, no? It's seems like valid call.
I think this was introduced in https://github.com/JuliaLang/julia/pull/45211 by @pcjentsch, @LilithHafner, @oscardssmith
Hi,
failing on 1.10 and a recent master branch:
We might have a sensible solution to this. We do the PR later.
Best,
Felix
cc: @sepehr78