We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The constructor for NullableCategoricalArray does not adhere to the ordering of the data when ordering levels.
julia> using CategoricalArrays WARNING: Method definition ==(Base.Nullable{S}, Base.Nullable{T}) in module Base at nullable.jl:244 overwritten in module NullableArrays at /Users/Cameron/.julia/v0.6/NullableArrays/src/operators.jl:128. julia> x = levels!(CategoricalArray(["B", "B", "A", "A"]), ["C", "B", "A"]) 4-element CategoricalArrays.CategoricalArray{String,1,UInt32}: "B" "B" "A" "A" julia> levels(x) 3-element Array{String,1}: "C" "B" "A" julia> nullx = NullableCategoricalArray(x) 4-element CategoricalArrays.NullableCategoricalArray{String,1,UInt32}: "B" "B" "A" "A" julia> levels(nullx) # why did the levels change? 3-element Array{String,1}: "A" "B" "C" julia> nullx = NullableCategoricalArray(x, ordered=true) 4-element CategoricalArrays.NullableCategoricalArray{String,1,UInt32}: "B" "B" "A" "A" julia> levels(nullx) # still reordered even with ordered=true 3-element Array{String,1}: "A" "B" "C" julia> droplevels!(nullx) # does not reset the order 4-element CategoricalArrays.NullableCategoricalArray{String,1,UInt32}: "B" "B" "A" "A" julia> levels(nullx) 2-element Array{String,1}: "A" "B"
same for Array{Strings}
julia> y = ["B", "B", "A", "A"] 4-element Array{String,1}: "B" "B" "A" "A" julia> nully = NullableCategoricalArray(y) 4-element CategoricalArrays.NullableCategoricalArray{String,1,UInt32}: "B" "B" "A" "A" julia> levels(nully) # ordering 2-element Array{String,1}: "A" "B" julia> nully = NullableCategoricalArray(y, ordered=true) 4-element CategoricalArrays.NullableCategoricalArray{String,1,UInt32}: "B" "B" "A" "A" julia> levels(nully) # ordering 2-element Array{String,1}: "A" "B" julia> droplevels!(nully) 4-element CategoricalArrays.NullableCategoricalArray{String,1,UInt32}: "B" "B" "A" "A" julia> levels(nully) 2-element Array{String,1}: "A" "B"
The text was updated successfully, but these errors were encountered:
I have a fix here, the hardest part is writing comprehensive tests to cover all cases.
Sorry, something went wrong.
Awesome! Looking forward to reviewing the code.
OK, see #63.
Successfully merging a pull request may close this issue.
The constructor for NullableCategoricalArray does not adhere to the ordering of the data when ordering levels.
same for Array{Strings}
The text was updated successfully, but these errors were encountered: