patapizza / pylouvain

A Python implementation of the Louvain method to find communities in large networks
110 stars 76 forks source link

Division by zero with only one node #3

Open garanews opened 6 years ago

garanews commented 6 years ago

I'm getting an error when using your class and having only a single node (basically when DB is empty and start to add first node)

garanews commented 6 years ago

I tried to fix with #4 Is it correct to return 0 ?

whutxyf commented 5 years ago

i want to know in the second step of louvain, from your code you did not recalculate the self.s_in. Is that true?