-
-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
julia> using ComponentArrays, InvertedIndices
julia> ca = ComponentArray(a=5, b=[4, 1])
ComponentVector{Int64}(a = 5, b = [4, 1])
julia> ca[Not(3)]
ERROR: MethodError: no method matching ComponentArrays.ComponentIndex(::InvertedIndex{Int64})
Closest candidates are:
ComponentArrays.ComponentIndex(::Idx, ::Ax) where {Idx, Ax<:AbstractAxis} at /Users/jonniediegelman/.julia/dev/ComponentArrays/src/componentindex.jl:2
ComponentArrays.ComponentIndex(::ViewAxis{Inds, IdxMap, Ax}) where {Inds, IdxMap, Ax} at /Users/jonniediegelman/.julia/dev/ComponentArrays/src/componentindex.jl:7
ComponentArrays.ComponentIndex(::Int64) at /Users/jonniediegelman/.julia/dev/ComponentArrays/src/componentindex.jl:5
...
Stacktrace:
[1] getindex(#unused#::Axis{(a = 1, b = 2:3)}, idx::InvertedIndex{Int64})
@ ComponentArrays ~/.julia/dev/ComponentArrays/src/axis.jl:154
[2] _broadcast_getindex_evalf
@ ./broadcast.jl:648 [inlined]
[3] _broadcast_getindex
@ ./broadcast.jl:621 [inlined]
[4] (::Base.Broadcast.var"#19#20"{Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(getindex), Tuple{Tuple{Axis{(a = 1, b = 2:3)}}, Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(ComponentArrays.getval), Tuple{Tuple{DataType}}}}}})(k::Int64)
@ Base.Broadcast ./broadcast.jl:1098
[5] ntuple
@ ./ntuple.jl:48 [inlined]
[6] copy
@ ./broadcast.jl:1098 [inlined]
[7] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(getindex), Tuple{Tuple{Axis{(a = 1, b = 2:3)}}, Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(ComponentArrays.getval), Tuple{Tuple{DataType}}}}})
@ Base.Broadcast ./broadcast.jl:883
[8] #s12#49
@ ~/.julia/dev/ComponentArrays/src/array_interface.jl:117 [inlined]
[9] var"#s12#49"(::Any, index_fun::Any, x::Any, idx::Any)
@ ComponentArrays ./none:0
[10] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any, N} where N)
@ Core ./boot.jl:571
[11] getindex
@ ~/.julia/dev/ComponentArrays/src/array_interface.jl:100 [inlined]
[12] getindex(x::ComponentVector{Int64}, idx::InvertedIndex{Int64})
@ ComponentArrays ~/.julia/dev/ComponentArrays/src/array_interface.jl:99
[13] top-level scope
@ REPL[7]:1Metadata
Metadata
Assignees
Labels
No labels