Skip to content

Commit

Permalink
Use args instead of kwargs in sortperm
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Dec 22, 2024
1 parent 86f90bd commit f571b27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/sort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1952,12 +1952,12 @@ function sortperm(A::AbstractArray;
scratch::Union{Vector{<:Integer}, Nothing}=nothing,
dims...) #to optionally specify dims argument
if rev === true
_sortperm(A; alg, order=ord(lt, by, true, order), scratch, dims...)
_sortperm(A, alg, ord(lt, by, true, order), scratch, dims)
else
_sortperm(A; alg, order=ord(lt, by, nothing, order), scratch, dims...)
_sortperm(A, alg, ord(lt, by, nothing, order), scratch, dims)
end
end
function _sortperm(A::AbstractArray; alg, order, scratch, dims...)
function _sortperm(A::AbstractArray, alg, order, scratch, dims)
if order === Forward && isa(A,Vector) && eltype(A)<:Integer
n = length(A)
if n > 1
Expand Down

0 comments on commit f571b27

Please sign in to comment.