Fixed a bug in NetworkDataset.

This commit is contained in:
Einar Ryeng 2006-10-03 21:05:41 +00:00
parent b49f25cb32
commit fb1ab3e4e9

View File

@ -288,7 +288,7 @@ class GraphDataset(Dataset):
if m!=n:
raise IOError, "Adjacency matrix must be square"
if A[A[:,0].nonzero()[0],0]==1: #unweighted graph
if A[A[:,0].nonzero()[0][0],0]==1: #unweighted graph
G = nx.Graph()
else:
G = nx.XGraph()