Did you import networkx as nx before running that example code?
>>>import networkx as nx
Somehow its not finding networkx.all_shortest_paths
Dan
On Nov 14, 2012, at 5:21 PM, basavesh wrote:
> Hi all,
>
> I'm using networkx for sometime. I wanted to check multipath(shortest paths) from source to target. I tried the example given in
http://networkx.lanl.gov/reference/generated/networkx.algorithms.shortest_paths.generic.all_shortest_paths.html#networkx.algorithms.shortest_paths.generic.all_shortest_paths
>
> >>> G=nx.Graph()
> >>> G.add_path([0,1,2])
> >>> G.add_path([0,10,2])
> >>> print([p for p in nx.all_shortest_paths(G,source=0,target=2)])
> [[0, 1, 2], [0, 10, 2]]
> but getting AttributeError: print([p for p in nx.all_shortest_paths(G,source=0,target=2)])
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'all_shortest_paths'
>
>
> please help me in this.
>
> --
> You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
> To view this discussion on the web visit
https://groups.google.com/d/msg/networkx-discuss/-/ZRYp1PVat5MJ.
> To post to this group, send email to
networkx...@googlegroups.com.
> To unsubscribe from this group, send email to
networkx-discu...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/networkx-discuss?hl=en.