Open BSnelling opened 2 years ago
An example with setdiff:
setdiff
julia> d1 = Indices(["A","B","C"]); julia> c1 = ["B","C","D"]; julia> setdiff(d1, c1) ERROR: MethodError: no method matching setdiff!(::Indices{String}, ::Vector{String})
Similarly with intersect
intersect
julia> intersect(d1, c1) ERROR: MethodError: no method matching intersect!(::Indices{String}, ::Vector{String})
I would expect these operations to return an Indices{String} with the result, which would be consistent with the behaviour of union
Indices{String}
union
julia> union(d1, c1) 4-element Indices{String} "A" "B" "C" "D"
Right - this does seem like something we can and should fix, using the same dispatch pattern as Base does.
Base
An example with
setdiff
:Similarly with
intersect
I would expect these operations to return an
Indices{String}
with the result, which would be consistent with the behaviour ofunion