Fixed a bug in NetworkDataset.
This commit is contained in:
parent
b49f25cb32
commit
fb1ab3e4e9
|
@ -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()
|
||||
|
|
Reference in New Issue