Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d1f525c

Browse filesBrowse files
committed
Merge pull request #5534 from mdboom/color-extensions
Fix #5524. +/m eps instead of np.inf
1 parent 698271c commit d1f525c
Copy full SHA for d1f525c

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎lib/matplotlib/contour.py

Copy file name to clipboardExpand all lines: lib/matplotlib/contour.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,10 +1231,11 @@ def _process_levels(self):
12311231
self.layers = 0.5 * (self._levels[:-1] + self._levels[1:])
12321232
# ...except that extended layers must be outside the
12331233
# normed range:
1234+
finfo = np.finfo(float)
12341235
if self.extend in ('both', 'min'):
1235-
self.layers[0] = -np.inf
1236+
self.layers[0] = self.vmin - finfo.eps
12361237
if self.extend in ('both', 'max'):
1237-
self.layers[-1] = np.inf
1238+
self.layers[-1] = self.vmax + finfo.eps
12381239

12391240
def _process_colors(self):
12401241
"""

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.