Skip to content

convert_graph_formats() handles networkx nodes that are neither strin…#242

Open
shashank025 wants to merge 1 commit intoGiulioRossetti:masterfrom
shashank025:convert_graph_formats_hashable
Open

convert_graph_formats() handles networkx nodes that are neither strin…#242
shashank025 wants to merge 1 commit intoGiulioRossetti:masterfrom
shashank025:convert_graph_formats_hashable

Conversation

@shashank025
Copy link

…gs nor ints

Identify the Bug

Description of the Change

As mentioned on issue #241, this change handles the scenario where the graph nodes are neither strings nor ints. This is done in two steps:

  1. A dictionary that maps from a string to the underlying node is constructed, and
  2. That dictionary is used to properly handle the scenario where the input graph is bipartite.

Alternate Designs

NA

Possible Drawbacks

One issue with this fix is the extra memory required to construct the dictionary. But I don't see a way around this if supporting bipartite graphs is required.

Verification Process

  • Manual verification (running the repro test script with test changes),
  • Added new test cases to test_utils.py.

Release Notes

Correctly handled conversion from networkx to igraph format for bipartite graphs where nodes are neither strings nor ints.

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

Successfully merging this pull request may close these issues.

1 participant