Set node attributes from dictionary of nodes and values
| Parameters : | G : NetworkX Graph name : string
attributes: dict :
|
|---|
Examples
>>> G=nx.path_graph(3)
>>> bb=nx.betweenness_centrality(G)
>>> nx.set_node_attributes(G,'betweenness',bb)
>>> G.node[1]['betweenness']
1.0