[graph-tool-tickets] [graph-tool] #84: RuntimeError exception thrown from eigenvector() if weight is not set

graph-tool webmaster at skewed.de
Mon Jan 2 15:27:18 UTC 2012


#84: RuntimeError exception thrown from eigenvector() if weight is not set
-----------------------------+---------------------------
 Reporter:  wojciechwasko@…  |      Owner:  tiago peixoto
     Type:  defect           |     Status:  new
 Priority:  normal           |  Milestone:
Component:  graph-tool       |    Version:  2.2
 Keywords:                   |
-----------------------------+---------------------------
 graph-tool version: 2.2.15;
 python version: 2.7

 When graph_tool.centrality.eigenvector is called without the '''weight'''
 attribute, the algorithm crashes with the following message
 {{{
 Traceback (most recent call last):
   File "/usr/local/lib/python2.7/site-
 packages/graph_tool/centrality/__init__.py", line 460, in eigenvector
     _prop("v", g, vprop), epsilon, max_iter)
 RuntimeError
 }}}

 If we explicitly set all weights to `1.0`, it calculates just fine.
 {{{
 prop = g_gt.new_edge_property("double")
 for e in g_gt.edges():
   prop[e] = 1.0

 eigenvector = gt.eigenvector(g_gt, epsilon=1e-7, max_iter=100000,
 weight=prop)
 }}}

 Sorry, can't narrow that down any further, I'm just getting to know the
 inner structure of graph-tool right now.

 Oh, and there's a typo in the doc - file
 `./graph_tool/centrality/__init__.py`, line 367; should be ''weight'' - is
 ''weights''

-- 
Ticket URL: <http://graph-tool.skewed.de/ticket/84>
graph-tool <http://graph-tool.skewed.de/>
An efficient python module for graph analysis and manipulation.


More information about the graph-tool-tickets mailing list