taynaud / python-louvain

Louvain Community Detection
BSD 3-Clause "New" or "Revised" License
964 stars 200 forks source link

why the len(dendo) - 1? #99

Open yaya159456 opened 1 year ago

yaya159456 commented 1 year ago
>>> G=nx.erdos_renyi_graph(100, 0.01)
>>> dendo = generate_dendrogram(G)
>>> for level in range(len(dendo) - 1) :
>>>     print("partition at level", level,
>>>           "is", partition_at_level(dendo, level))

why need to set len(dendo) - 1? Other words,what the dendo[-1] means?