Skip to content

Commit

Permalink
fix(numpy 2.0 deprecation): replace np.alltrue with np.all (#2088)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnfienen authored Feb 4, 2024
1 parent f37610d commit ad35b8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flopy/mf6/utils/model_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion flopy/plot/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ad35b8d

Please sign in to comment.