lamm-mit / GraphReasoning

Apache License 2.0
155 stars 39 forks source link

Changed import line from <import community as community_louvain> to <from community import community_louvain> #2

Closed ChristopherOosthuizen closed 6 months ago

ChristopherOosthuizen commented 6 months ago

This fixed Issue #1 which makes it that graph_Louvain and get_statitcs_and_plots_for_large_graphs produce a attribute error when called. This is because they call community.best_partition(G) which is only a function insides community.community_louvain. This merge fixes this issue.

zhoufy20 commented 1 week ago

Thanks a lot for your advice! But I still run failed.

/graph_tools.py:512, in graph_statistics_and_plots_for_large_graphs(G, data_dir, include_centrality, make_graph_plot, root, log_scale, log_hist_scale, density_opt, bins)
 <Error retrieving source code with stack_data see ipython/ipython#13598>
AttributeError: module 'community' has no attribute 'best_partition'

where

community                 1.0.0b1                  pypi_0    pypi
python-louvain            0.16                     pypi_0    pypi