I just started going through the basic of NetworkX as I intend to use if for networks definitions corresponding to constrained shortest path problems. I was playing with one of the initial examples (this is the piece of code I have:)
from networkx import *
g = DiGraph()
g.add_edge('a','b',weight=0.1)
g.add_edge('b','c',weight=1.5)
g.add_edge('a','c',weight=0.1)
g.add_edge('c','d',weight=1.0)
print shortest_path(g,'b','d')
print shortest_path(g,'b','d',weighted=True)
I am getting: "TypeError: shortest_path() got an unexpected keyword argument 'weighted'". I checked in past posts and basically the comments point to a version related issue. I verified and the version installed in my laptop is 1.8.1.
Thanks in advance for any help.