You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
vtjnash
changed the title
similar should not pirate Array methods?
similar should not pirate Array Types in methods?
Apr 19, 2023
It seems like the only reason
similar
would be called onArray{<:CategoricalValue}
with a new eltype ofCategoricalValue
means the user apparently explicitly wanted anArray
(otherwise, it would have been called with anAbstractRange 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 extrasimilar
methods, so that requests for asimilar
object to a BaseVector
does indeed return some similarVector
to the original. But keep the methods fortypeof(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 tocollect_to
?The text was updated successfully, but these errors were encountered: