Skip to content

Commit 6a66f76

Browse files
authored
Merge pull request #17801 from dopplershift/fix-is-closed
BUG: Fix implementation of _is_closed_polygon
2 parents 0c35ebf + efa5b10 commit 6a66f76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/contour.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def _is_closed_polygon(X):
629629
presumably coordinates on a polygonal curve, in which case this function
630630
tests if that curve is closed.
631631
"""
632-
return np.all(X[0] == X[-1])
632+
return np.allclose(X[0], X[-1], rtol=1e-10, atol=1e-13)
633633

634634

635635
def _find_closest_point_on_path(lc, point):

0 commit comments

Comments
 (0)