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

Use IndexMapping as node labels by default #115

Open
IngoScholtes opened this issue Feb 22, 2024 · 1 comment
Open

Use IndexMapping as node labels by default #115

IngoScholtes opened this issue Feb 22, 2024 · 1 comment
Assignees
Labels
dagstuhl enhancement New feature or request

Comments

@IngoScholtes
Copy link
Member

I think it would be a good idea if the plot function used the ID-Index mapping stored in Graph.mapping as node labels by default (if such a mapping is defined). If no such mapping is defined, the plot function should use the node indices as labels by default.

This would allow users to omit passing the plot argument node_label=g.mapping.node_id.

@IngoScholtes IngoScholtes added the enhancement New feature or request label Feb 22, 2024
@IngoScholtes IngoScholtes added this to the End of February Demo milestone Feb 22, 2024
@M-Lampert
Copy link
Contributor

On that note, currently you get some kind of JSON error when you try to assign a numpy.array or a torch.Tensor to node_label because it is not hashable. It would be great if the conversion to a Python list happens internally for a more seamless integration with torch and numpy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dagstuhl enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants