From 0c248accc8f597ac8217ce9fe5bba049699b6194 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Fri, 7 Oct 2022 10:02:51 +0200 Subject: [PATCH] Backport PR #24115: Fix mask lookup in fill_between for NumPy 1.24+ --- 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 9df42e0c4d0b..e5e34c91257d 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5256,7 +5256,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)