From 24db92b49627fe5abbe493e991bbc6707ebd93be Mon Sep 17 00:00:00 2001 From: Joshua Larsen Date: Thu, 15 Aug 2019 17:51:51 -0700 Subject: [PATCH 1/2] Fix(UnstructuredGrid): fix for ncpl provided as a list or numpy array --- flopy/discretization/unstructuredgrid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flopy/discretization/unstructuredgrid.py b/flopy/discretization/unstructuredgrid.py index a3ae57e0d7..fbb4d6f0b0 100644 --- a/flopy/discretization/unstructuredgrid.py +++ b/flopy/discretization/unstructuredgrid.py @@ -51,7 +51,7 @@ def __init__(self, vertices=None, iverts=None, xcenters=None, ycenters=None, else: msg = ('Length of iverts must equal ncpl.sum ' '({} {})'.format(len(iverts), ncpl)) - assert len(iverts) == ncpl.sum(), msg + assert len(iverts) == np.sum(ncpl), msg assert np.array(self.xcellcenters).shape[0] == self.ncpl assert np.array(self.ycellcenters).shape[0] == self.ncpl From 55b592ada647cc30d045e881fa8989b414cc2d85 Mon Sep 17 00:00:00 2001 From: Joshua Larsen Date: Thu, 15 Aug 2019 17:54:43 -0700 Subject: [PATCH 2/2] Fix(plot_array): fix for CVFD masked_values when plotting arrays --- 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 365b4b9e5b..dd4b4668bb 100644 --- a/flopy/plot/map.py +++ b/flopy/plot/map.py @@ -170,7 +170,7 @@ def plot_array(self, a, masked_values=None, **kwargs): else: quadmesh = plotutil.plot_cvfd(self.mg._vertices, self.mg._iverts, - a=a, ax=ax) + a=plotarray, ax=ax) # set max and min if 'vmin' in kwargs: