Skip to content

Commit 9a70b39

Browse files
committed
avoid multiple equality comparisons
1 parent d392063 commit 9a70b39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libpysal/weights/gabriel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def _filter_relativehood(edges, coordinates, return_dkmax=False):
345345
dij = ((pi - pj) ** 2).sum() ** 0.5
346346
prune = False
347347
for k in range(n):
348-
if k == i or k == j:
348+
if k in (i, j):
349349
continue
350350
pk = coordinates[k]
351351
dik = ((pi - pk) ** 2).sum() ** 0.5

0 commit comments

Comments
 (0)