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

Skip to content

Commit 90a3971

Browse files
committed
MNT: make pcolormesh more robust to masked array underflow
1 parent d2cc4d0 commit 90a3971

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5883,7 +5883,7 @@ def _pcolorargs(self, funcname, *args, shading='auto', **kwargs):
58835883
def _interp_grid(X):
58845884
# helper for below
58855885
if np.shape(X)[1] > 1:
5886-
dX = np.diff(X, axis=1)/2.
5886+
dX = np.diff(X, axis=1) * 0.5
58875887
if not (np.all(dX >= 0) or np.all(dX <= 0)):
58885888
_api.warn_external(
58895889
f"The input coordinates to {funcname} are "

0 commit comments

Comments
 (0)