Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe238a5

Browse files
authored
Merge pull request #17809 from meeseeksmachine/auto-backport-of-pr-17801-on-v3.3.x
Backport PR #17801 on branch v3.3.x (BUG: Fix implementation of _is_closed_polygon)
2 parents f177826 + a1e1d70 commit fe238a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
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)