igraph-help
[Top][All Lists]
Advanced

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

[igraph] walktrap membership help


From: Ryanne Turenhout
Subject: [igraph] walktrap membership help
Date: Thu, 15 Nov 2012 13:17:43 +0100

Hi everyone,

I just started out with iGraph in the python interface, I have trouble printing out the membership of the community_walktrap. I have tried this:

cl = g.community_walktrap()
print cl.membership()

But i get the following error:
   print cl.membership
AttributeError: 'VertexDendrogram' object has no attribute 'membership'
Traceback (most recent call last):

I just want a list of the memberships, like this:
[0,0,1,2,0,4]

After this I want to add this membership as an attribute to the respective vertex, like this:
g.vs["community"] = 0 (but this of course for each vertex).

However, I cannot do this if I cannot even get a list of the memberships. Any help would be much appreciated.

Best,
Ryanne

reply via email to

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