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

Missing methods for some set operations between AbstractIndices and itr #100

Open
BSnelling opened this issue Apr 29, 2022 · 1 comment
Open

Comments

@BSnelling
Copy link
Contributor

An example with 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

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

julia> union(d1, c1)
4-element Indices{String}
 "A"
 "B"
 "C"
 "D"
@andyferris
Copy link
Owner

Right - this does seem like something we can and should fix, using the same dispatch pattern as Base does.

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

2 participants