From 354255a165e36ad14b227e31f39b6156017055ee Mon Sep 17 00:00:00 2001 From: Mike Fienen Date: Sat, 3 Feb 2024 11:14:46 -0600 Subject: [PATCH 1/2] hotfix(numpy 2.0 deprecation)replace np.alltrue with np.all in plot/map.py --- flopy/plot/map.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flopy/plot/map.py b/flopy/plot/map.py index 93d272ec02..c8714327bc 100644 --- a/flopy/plot/map.py +++ b/flopy/plot/map.py @@ -284,7 +284,7 @@ def contour_array(self, a, masked_values=None, tri_mask=False, **kwargs): for ix, nodes in enumerate(triangles): neighbors = self.mg.neighbors(nodes[i], as_nodes=True) isin = np.isin(nodes[i + 1 :], neighbors) - if not np.alltrue(isin): + if not np.all(isin): mask[ix] = True if ismasked is not None: From 9f0d512822b6f0a254bc4a80ff1c38817aed7342 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Sun, 4 Feb 2024 18:11:46 -0500 Subject: [PATCH 2/2] replace np.alltrue() -> np.all() in model_splitter.py --- flopy/mf6/utils/model_splitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flopy/mf6/utils/model_splitter.py b/flopy/mf6/utils/model_splitter.py index 65582f390e..090a388b09 100644 --- a/flopy/mf6/utils/model_splitter.py +++ b/flopy/mf6/utils/model_splitter.py @@ -427,7 +427,7 @@ def optimize_splitting_mask(self, nparts): mnums1 = membership[nodes1] mnums2 = membership[nodes2] ev = np.equal(mnums1, mnums2) - if np.alltrue(ev): + if np.all(ev): continue idx = np.where(~ev)[0] mnum_to = mnums1[idx]