-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Intersection of CartesianIndices #33055
Comments
Sure, that seems like a reasonable specialization to have. I'd put it in the It looks like we already handle julia> intersect(Base.OneTo(4), Base.OneTo(5))
Base.OneTo(4)
julia> intersect(Base.OneTo(4), 1:5)
1:4 As far as why |
What needs to be done to get this merged? The implementation of |
Submit a pull request with some tests. |
Hey,
I recently stumbled across the fact, that intersection of CartesianIndices can be quite slow and scales with the size of the ranges that are used. As such I found out that there is no specialized version for the intersection of multiple CartesianIndices. Does this have any reason? If not, if you want and if you tell me where that line
would go and what the proper naming conventions here are, I could do a pull request.
EDIT: How to handle intersect(IdentityUnitRange, IdentityUnitRange) and mixed intersect?
https://github.com/JuliaLang/julia/blob/master/base/multidimensional.jl#L385
And while looking into this file, why do you not use a short-circuiting
&&
in this line?The text was updated successfully, but these errors were encountered: