From b776ff17f8652e92a6db8d865fbbd80b1ff2ef30 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 7 Oct 2022 01:41:41 -0400 Subject: [PATCH] Fix mask lookup in fill_between for NumPy 1.24+ Fixes #24106 --- lib/matplotlib/axes/_axes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 64ee4a512236..e6d8a7368975 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5272,7 +5272,7 @@ def _fill_between_x_or_y( raise ValueError(f"where size ({where.size}) does not match " f"{ind_dir} size ({ind.size})") where = where & ~functools.reduce( - np.logical_or, map(np.ma.getmask, [ind, dep1, dep2])) + np.logical_or, map(np.ma.getmaskarray, [ind, dep1, dep2])) ind, dep1, dep2 = np.broadcast_arrays( np.atleast_1d(ind), dep1, dep2, subok=True)