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

similar should not pirate Array Types in methods? #402

Open
vtjnash opened this issue Apr 19, 2023 · 0 comments
Open

similar should not pirate Array Types in methods? #402

vtjnash opened this issue Apr 19, 2023 · 0 comments

Comments

@vtjnash
Copy link
Contributor

vtjnash commented Apr 19, 2023

It seems like the only reason similar would be called on Array{<:CategoricalValue} with a new eltype of CategoricalValue means the user apparently explicitly wanted an Array (otherwise, it would have been called with an AbstractRange typeof(1:1) for instance). It seems like this package might be not following user expectations here, which is also appearing to cause many invalidations during loading, leading to worse precompile results across the Julia ecosystem. I think we should delete these extra similar methods, so that requests for a similar object to a Base Vector does indeed return some similar Vector to the original. But keep the methods for typeof(1:1), so that collect with a CategoricalValue does still get the CategoricalArray as intended, when the user has not otherwise tried to explicitly ask for it to return a Base.Vector type as the argument to collect_to?

@vtjnash vtjnash changed the title similar should not pirate Array methods? similar should not pirate Array Types in methods? Apr 19, 2023
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

No branches or pull requests

1 participant