Skip to content

Commit 889c3f1

Browse files
committed
Fix sort
1 parent c35e67b commit 889c3f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ function Base.sort!(v::CategoricalVector;
11341134
levs = eltype(v) >: Missing ?
11351135
eltype(v)[i == 0 ? missing : CategoricalValue(v.pool, i) for i in 0:length(v.pool)] :
11361136
eltype(v)[CategoricalValue(v.pool, i) for i in 1:length(v.pool)]
1137-
sortedlevs = sort!(Vector(view(levs, seen)), order=ord)
1137+
sortedlevs = sort!(Vector{eltype(levs)}(view(levs, seen)), order=ord)
11381138
levelsmap = something.(indexin(sortedlevs, levs))
11391139
j = 0
11401140
refs = v.refs

0 commit comments

Comments
 (0)