Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilith Hafner authored and Lilith Hafner committed Oct 29, 2022
1 parent ed78639 commit e36682d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/sort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ struct WithoutMissingVector{T, U <: AbstractVector{Union{T, Missing}}} <: Abstra
end
Base.@propagate_inbounds function Base.getindex(v::WithoutMissingVector, i)
out = v.data[i]
@assert !out isa Missing
@assert !(out isa Missing)
out::eltype(v)
end
Base.@propagate_inbounds function Base.setindex!(v::WithoutMissingVector{T}, x::T, i) where T
Expand Down Expand Up @@ -751,7 +751,7 @@ function _sort!(v::AbstractVector, a::ConsiderRadixSort, o::DirectOrdering;
U = UIntMappable(eltype(v), o),
mn, mx, umn=uint_map(mn, o), umx=uint_map(mx, o), urange=umx-umn,
bits = unsigned(8sizeof(urange) - leading_zeros(urange)), kw...)
if sizeof(U) <= 8 && bits+70 < 22log(lenm1)
if sizeof(U) <= 8 && bits+70 < 22log(lenm1) # TODO there are some unexpected allocations here
_sort!(v, a.radix, o; lo, hi, lenm1, mn, mx, umn, umx, urange, bits, kw...)
else
_sort!(v, a.next, o; lo, hi, lenm1, mn, mx, umn, umx, urange, bits, kw...)
Expand Down

0 comments on commit e36682d

Please sign in to comment.