5
get_edge_attributes()関数を使用せずにグラフから特定の属性を持つエッジを取得しようとしています。私はそれを行うより柔軟な方法が必要です。私は、ノードの属性を取得することができますが、私はPythonのエッジで新しいですので、は思え困難NetworkXグラフのエッジを解析する
G = nx.read_graphml("test.graphml")
for n in G:
print "%s\t%s" %(n, G.node[n].get(attr))
for (s,d) in G: # and here is my problem
print "%s->%s\t%s" %(s, d, G.edge[s][d].get(attr))
ありがとうございますAric! – geolykos