Skip to content

Commit

Permalink
Fix(unstructured grid capabilities): fix array masking for CVFD grids…
Browse files Browse the repository at this point in the history
… and allow ncpl to be specified as a list (#631)

* Fix(UnstructuredGrid): fix for ncpl provided as a list or numpy array

* Fix(plot_array): fix for CVFD masked_values when plotting arrays
  • Loading branch information
jlarsen-usgs authored and langevin-usgs committed Aug 16, 2019
1 parent 286252a commit 6c407c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flopy/discretization/unstructuredgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion flopy/plot/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6c407c0

Please sign in to comment.