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

Skip to content

Commit b2c0352

Browse files
author
Brian Mattern
committed
use np.inf instead of arbitrary 1e10
1 parent 0b72b18 commit b2c0352

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/contour.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ def _find_closest_point_on_path(lc, point):
721721
ds = np.sum((lc - point[None, :])**2, 1)
722722
imin = np.argmin(ds)
723723

724-
dmin = 1e10
724+
dmin = np.inf
725725
xcmin = None
726726
legmin = (None, None)
727727

@@ -1326,7 +1326,7 @@ def find_nearest_contour(self, x, y, indices=None, pixel=True):
13261326
if indices is None:
13271327
indices = range(len(self.levels))
13281328

1329-
dmin = 1e10
1329+
dmin = np.inf
13301330
conmin = None
13311331
segmin = None
13321332
xmin = None

0 commit comments

Comments
 (0)