-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
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
unique() returns levels, not the CategoricalArray #357
Comments
This is consistent with the docstring of
However, indeed, it is strange and I would also expect |
See previous discussion at #129. The current behavior of |
It's strange that I have realized it only now, but
unique(v::CategoricalArray{S})
returnsVector{S}
, and not the categorical array of the same type asv
.Should it actually preserve the type of
v
to conform to theBase.unique()
definition?Otherwise some user code that should work regardless of the vector type (e.g.
Vector{String}
orCategoricalVector{String}
) produces errors.The text was updated successfully, but these errors were encountered: