Skip to content

Commit e6c77a3

Browse files
committed
make sure to return early if possible
1 parent fd45919 commit e6c77a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libpysal/cg/alpha_shapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def _valid_hull(geoms, points):
517517
flag = True
518518
# if there is not exactly one polygon
519519
if geoms.shape[0] != 1:
520-
flag = False
520+
return False
521521
# if any (xys) points do not intersect the polygon
522522
if HAS_PYGEOS:
523523
return pygeos.intersects(pygeos.from_shapely(geoms[0]), points).all()

0 commit comments

Comments
 (0)