-
Notifications
You must be signed in to change notification settings - Fork 19
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
Broadcasted Base.getindex #39
Comments
Hmm, I'm not super convinced we need this.
Is there a particular use case you had in mind? |
I see. Do you worry that it will have any unwanted implications ? Having a fully concrete type The motivation behind is that when I use For example all getindex.([colors], label_for.([colors], inneighbors(colors, code_for(colors, :blue)))) to just get the data of all the nodes that go into the Ideally this should be just
this demands dispatching |
sorry, that's not quite true. This also requires that |
This is actually the reason behind my alternate implementation in MetaDataGraphs.jl: for my personal use, |
Unfortunately, even if we extend |
Agreed, and I think the discussion above shows that the real issue is not the dict syntax but the interactions between labels, code and data |
Moving this specific discussion to #44 |
Taking the example in docs
wouldn't we want to support something like this ?
I was expecting to get the following
I think the implementation would also be rather easy by dispatching to something like
Base.getindex(mg::MetaGraphs{Label}, vec::Vector{Label})
I could eventually file a PR if interested.
The text was updated successfully, but these errors were encountered: