Reputation: 1
i work with igraph in python.I want to find the "betweeness" and "closeness" of my graph. It return the same error even my weight was positive.
Gm.betweenness(directed=False, weights = Gm.es["weight"], nobigint=False)
InternalError
Traceback (most recent call last)
<ipython-input-51-cd86830ce27a> in <module>
----> 1 Gm.betweenness(directed=False, weights = Gm.es["weight"], nobigint=False)
InternalError: Error at c:\projects\python-igraph\vendor\build\igraph\igraph-0.8.0-msvc\src\centrality.c:1641: Weight vector must be positive, Invalid value
Upvotes: 0
Views: 453
Reputation: 25
It is possible some of your edge weights are zero. Even though the error says "Weight vector must be positive" what it really means is all the elements of the weight vector has to be > 0. Try filtering out any zeroes or replace your 0s with a 0.0001.
Upvotes: 1