The creation of Networkx graph in the first place was not correct. I changed the line G=nx.DiGraph(directed=True) to G=nx.
確定! 回上一頁