-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement Base.checkindex
for InvertedIndex
#21
Comments
Does CategoricalArrays call |
AFAICT we only call And indeed |
Right, as I recall, we don't implement the iteration/array-like behaviors on Is there a reason you haven't used |
No particular reason. I just used the simplest approach I could find. I guess I could do |
No, I was expecting you'd need to do: I′ = to_indices(A, I)
checkbounds(A, I′)
# implementation using I′ and not I The reason it's not implemented is because I don't expect implementations to be able to use Interestingly, I'm not sure what'll happen if you call |
Yeah that's a particular case where we can let
Looks like it does: julia> typeof(to_indices([1], (Not(2),)))
Tuple{InvertedIndices.InvertedIndexIterator{Int64,Int64,Base.OneTo{Int64}}}
julia> typeof(to_indices([1], to_indices([1], (Not(2),))))
Tuple{InvertedIndices.InvertedIndexIterator{Int64,Int64,Base.OneTo{Int64}}} |
Yeah, let's implement |
Is there any reason why
checkindex(::Type{Bool}, ..., ::InvertedIndex)
isn't implemented? CategoricalArrays currently doesn't work withNot
because of this (JuliaData/CategoricalArrays.jl#296):The text was updated successfully, but these errors were encountered: