NetComp icon indicating copy to clipboard operation
NetComp copied to clipboard

networkx 2 compatibility

Open YamLyubov opened this issue 2 years ago • 0 comments

This version allows using both networkx 1 and networkx 2. Most changes are connected to formating.

Main changes to allow networkx 2 usage are:

  • (G.subgraph(c).copy() for c in nx.connected_components(G)) instead of nx.connected_component_subgraphs(G) (cause the function was deprecated) here and here
  • converting returned object to dict list(dict(G.degree()).values()) instead of list(G.degree().values()) here
  • converting returned object to list [list(G.neighbors(i)) for i in range(n)] instead of [G.neighbors(i) for i in range(n)] here

#2

YamLyubov avatar Dec 22 '22 12:12 YamLyubov