Skip to content

Commit

Permalink
replace equalto and occursin with curried isequal, ==, and `i…
Browse files Browse the repository at this point in the history
…n` (#26436)
  • Loading branch information
JeffBezanson authored Mar 15, 2018
1 parent aa5b86e commit 43fba13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sparsevector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1954,7 +1954,7 @@ function sort(x::SparseVector{Tv,Ti}; kws...) where {Tv,Ti}
allvals = push!(copy(nonzeros(x)),zero(Tv))
sinds = sortperm(allvals;kws...)
n,k = length(x),length(allvals)
z = findfirst(equalto(k),sinds)::Int
z = findfirst(isequal(k),sinds)::Int
newnzind = Vector{Ti}(1:k-1)
newnzind[z:end] .+= n-k+1
newnzvals = allvals[deleteat!(sinds[1:k],z)]
Expand Down

0 comments on commit 43fba13

Please sign in to comment.