-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Labels
errataFlag errors in the bookFlag errors in the book
Description
On p. 169 (section 6.3.2) we give the following code to import the community module and run the Louvain algorithm:
# download community module at
# github.com/taynaud/python-louvain
import community
# returns the partition with largest modularity
partition_dict = community.best_partition(G)
In some cases (e.g., on Google Colab), the import function does not work as expected, and the above code produces:
AttributeError: module 'community' has no attribute 'best_partition'
In such a case, the following import should work:
import community.community_louvain as community
Metadata
Metadata
Assignees
Labels
errataFlag errors in the bookFlag errors in the book