Skip to content

Commit

Permalink
Rename unexported isgreater in reduceddim
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcaine committed Mar 30, 2020
1 parent b6c06dd commit f6a2e73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/reducedim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ function _findmin(A, region)
end
end

isgreater(a, b) = isless(b,a)
_isgreater(a, b) = isless(b,a)

"""
findmax!(rval, rind, A) -> (maxval, index)
Expand All @@ -791,7 +791,7 @@ dimensions of `rval` and `rind`, and store the results in `rval` and `rind`.
"""
function findmax!(rval::AbstractArray, rind::AbstractArray, A::AbstractArray;
init::Bool=true)
findminmax!(isgreater, init && !isempty(A) ? fill!(rval, first(A)) : rval, fill!(rind,zero(eltype(keys(A)))), A)
findminmax!(_isgreater, init && !isempty(A) ? fill!(rval, first(A)) : rval, fill!(rind,zero(eltype(keys(A)))), A)
end

"""
Expand Down Expand Up @@ -824,7 +824,7 @@ function _findmax(A, region)
end
similar(A, ri), zeros(eltype(keys(A)), ri)
else
findminmax!(isgreater, fill!(similar(A, ri), first(A)),
findminmax!(_isgreater, fill!(similar(A, ri), first(A)),
zeros(eltype(keys(A)), ri), A)
end
end
Expand Down

0 comments on commit f6a2e73

Please sign in to comment.