Skip to content
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

extend CategoricalArrays #716

Merged
merged 3 commits into from
May 18, 2024
Merged

extend CategoricalArrays #716

merged 3 commits into from
May 18, 2024

Conversation

tiemvanderdeure
Copy link
Contributor

Extend CategoricalArrays, so categorical(x::DimArray) returns a DimArray with categorical values, and common (documented) operations on categorical arrays work on such categorical DimArrays.

Extend CategoricalArrays, so `categorical(x::DimArray)` returns a `DimArray` with categorical values, and common (documented) operations on categorical arrays work on such categorical DimArrays.
@rafaqz
Copy link
Owner

rafaqz commented May 17, 2024

Thanks! Good to have

For my understanding is there a reason these things don't "just work" already? Does CategoricalArrays.jl not use similar or not accept AbstractArray ?

@tiemvanderdeure
Copy link
Contributor Author

They don't work already. categorical errors due to an ambiguous dispatch of copyto!, cut does not error but returns a CategoricalArray (without dimensions). All of the other methods dispatch on CategoricalArray.

@rafaqz
Copy link
Owner

rafaqz commented May 18, 2024

Ah right, they haven't written it to be extensible at all.

@rafaqz rafaqz merged commit 969f953 into rafaqz:main May 18, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants