igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] shortest path between two vertices


From: Rajarshi Guha
Subject: Re: [igraph] shortest path between two vertices
Date: Mon, 2 Feb 2009 21:33:11 -0500



On Mon, Feb 2, 2009 at 9:01 PM, Chris Wj <address@hidden> wrote:
From source doc:

 shortest_paths(source=None, target=None, weights=None, mode=OUT)
   
 

import igraph
G = igraph.Graph()
# create your graph
spaths_from_0 = G.shortest_paths(0)

Thanks for the pointer. But igraph 0.5.1 and Python 2.5 the following code gives an error

print g.shortest_paths( source=[0], targets=[1], weights=None, mode=igraph.ALL) 

Traceback (most recent call last):
  File "goanal.py", line 61, in <module>
    print g.shortest_paths( source=[0], targets=[1])
TypeError: 'source' is an invalid keyword argument for this function




--
Rajarshi Guha

reply via email to

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