Reputation: 35
I get the error
NameError: name 'girvan_newman' is not defined
when try to use this algorithm in networkx 2.0. Could someone help to fix this problem?
Upvotes: 1
Views: 2203
Reputation: 86
davedwards is right , you need to provide the missing import statements:
import networkx as nx
from networkx.algorithms import community
communities_generator = community.girvan_newman(G)
Check https://networkx.github.io/documentation/latest/reference/algorithms/community.html
Upvotes: 2