[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Modularity function on python version

From: Simone Caschili
Subject: [igraph] Modularity function on python version
Date: Sun, 24 Feb 2008 13:18:08 +0100


I'm using modularity function on igraph  python version. I would get a value of modularity for my graph g that is a weighted graph while I would pass an a priori membership. Thus, in order to get what i need, i have built a list  that represents my membership, it is like:


I would just split my graph into two communities. Edge's weights are also stored in a list like:


When I run my code I get this error:

>Traceback (most recent call last):
> File "1.py", line 120, in ?
>    print g.modularity(memb,weights)
>TypeError: modularity() takes exactly 2 arguments (3 given)

Since I've tried to use only membership or weights, the code works but it doesn't solve my issue because i need a "weighed" modularity calculated on a certain membership.

Could anyone help me?
Thank you

reply via email to

[Prev in Thread] Current Thread [Next in Thread]