Skip to content

Use of non-public API in extracting levels #25

@ablaom

Description

@ablaom

In the example below we have x.pool.levels which I don't believe is public API. You can instead do CategoricalArrays.levels(x) for a CategoricalValue or a CategoricalArray. After CategoricalArrays.jl v1.0, this returns a CategoricalVector (previously it returned the unwrap of that). I am separately posting a PR to force v1.0, currently you have 0.10. After that update, you may possibly need to apply CategoricalArrays.unwrap to the result of levels(x) to get "raw" values, if you really need them.

https://github.com/cjdoris/ARFFFiles.jl/blob/a93f9d5c4596e9ccce6b7be2b80e5d960ce6c39b/src/ARFFFiles.jl#L1173

There are other examples of the improper use. I found three with this search: https://github.com/search?q=repo%3Acjdoris%2FARFFFiles.jl%20levels&type=code

cc nalimilan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions