-
Notifications
You must be signed in to change notification settings - Fork 15
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
[pyos][io] Conversion to NetworkX drops isolated vertices #475
Comments
Thank you for raising this! By creating isolates in As such, this could be an additional convenience feature (as an additional |
Indeed these are not comparable concepts. In your example, 0, 1 and 3 are not vertex indices. They are just "names". They might as well be In comparison, in python-graphblas we have indices: 1st row (index 0), second row (index 1), etc. The current behaviour is not treating the python-graphblas matrix as an adjacency matrix when converting to a graph. An |
We discussed this and #476 in a recent meeting. I don't recall whether we got consensus, but there is an argument to be made that the nodes should always be added or at least be added by default. Thanks for raising this issue @szhorvat! Converting GraphBLAS objects to and from graph objects from other libraries is something we'd like to tackle this year, so I think this issue is related to #398. Defining node attributes with a vector could also make sense. |
When converting to NetworkX, isolated vertices are dropped. Example:
G.nodes
givesNodeView((0, 1, 3))
. Nodes2
and4
are both missing. This issue also affectsviz.draw()
. I do understand that it is one way to handle non-square matrices ...Is this intentional or a bug? It is at least very surprising, and if intentional, it should be clearly documented.
Part of: pyOpenSci/software-submission#81
The text was updated successfully, but these errors were encountered: