Last active
December 28, 2019 07:20
-
-
Save prateekjoshi565/243fae553d34f6ded98c69e8fddfc1a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# combine all nodes in a list | |
node_list = node_list_1 + node_list_2 | |
# remove duplicate items from the list | |
node_list = list(dict.fromkeys(node_list)) | |
# build adjacency matrix | |
adj_G = nx.to_numpy_matrix(G, nodelist = node_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment