Fixed a bug in NetworkDataset.
This commit is contained in:
parent
b49f25cb32
commit
fb1ab3e4e9
|
@ -288,7 +288,7 @@ class GraphDataset(Dataset):
|
||||||
if m!=n:
|
if m!=n:
|
||||||
raise IOError, "Adjacency matrix must be square"
|
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()
|
G = nx.Graph()
|
||||||
else:
|
else:
|
||||||
G = nx.XGraph()
|
G = nx.XGraph()
|
||||||
|
|
Reference in New Issue