0
我試圖計算具有多個邊的圖的點擊次數我已經寫在networkx小代碼如下:命中計算在圖形networkx
import networkx as nx
import matplotlib.pylab as plot
g=nx.read_pajek("D:\Slash.net")
h,a=nx.hits(g)
但是,當我試着執行我的代碼以下錯誤:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\networkx-1.7-py2.7.egg\networkx
\link_analysis\hits_alg.py", line 74, in hits
raise Exception("hits() not defined for graphs with multiedges.")
Exception: hits() not defined for graphs with multiedges.
對它請看看 感謝和問候!
也許你的圖有多個。 – 2013-03-04 15:03:02