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:
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