igraph-help
[Top][All Lists]
Advanced

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

[igraph] Python igraph weighted centrality error: unhandled type


From: Triple A
Subject: [igraph] Python igraph weighted centrality error: unhandled type
Date: Wed, 28 Mar 2018 09:54:13 -0700

Dear all,

I am calculating weighted centrality measures using python-igraph.

from igraph import *
g = Graph.Read_Ncol("sample.txt",names=True,directed=False,weights=True)
print (g.vs["name"])
print (g.es["weight"])

Below are two lists of the vertices and edge weights in my network:

['a', 'b', 'c', 'd', 'e']
[4.0, 2.0, 3.0, 4.0, 4.0]

I am using following codes calculating weighted centrality:

print (g.strength(weights=True))
print (g.betweenness(weights=True))

Below is the error message I got:

TypeError: unhandled type

Can anyone let me know what went wrong? Thank you!

Claire

reply via email to

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