Triple A
2018-03-28 16:54:13 UTC
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
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