Skip to content

Commit

Permalink
Fix bug in ismember function
Browse files Browse the repository at this point in the history
  • Loading branch information
tkipf committed May 14, 2018
1 parent 8e8bf11 commit cc5aa6c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions gae/preprocessing.py
Expand Up @@ -57,8 +57,7 @@ def mask_test_edges(adj):

def ismember(a, b, tol=5):
rows_close = np.all(np.round(a - b[:, None], tol) == 0, axis=-1)
return (np.all(np.any(rows_close, axis=-1), axis=-1) and
np.all(np.any(rows_close, axis=0), axis=0))
return np.any(rows_close)

test_edges_false = []
while len(test_edges_false) < len(test_edges):
Expand Down Expand Up @@ -110,5 +109,3 @@ def ismember(a, b, tol=5):

# NOTE: these edge lists only contain single direction of edge!
return adj_train, train_edges, val_edges, val_edges_false, test_edges, test_edges_false


0 comments on commit cc5aa6c

Please sign in to comment.