From 7b77d18c4a8b9bc4e27d853b70ed189af7a055d1 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Fri, 1 Dec 2023 15:59:06 -0500 Subject: [PATCH] debug disu, cleanup --- flopy/utils/gridgen.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flopy/utils/gridgen.py b/flopy/utils/gridgen.py index 5d292df84e..dfb73989b3 100644 --- a/flopy/utils/gridgen.py +++ b/flopy/utils/gridgen.py @@ -286,9 +286,7 @@ def __init__( # Set up a blank _refinement_features list with empty list for # each layer self._rfdict = {} - self._refinement_features = [] - for k in range(self.nlay): - self._refinement_features.append([]) + self._refinement_features = [[] for _ in range(self.nlay)] # Set up blank _elev and _elev_extent dictionaries self._asciigrid_dict = {} @@ -403,7 +401,7 @@ def add_active_domain(self, feature, layers): # expand shapefile path or create one from polygon feature if isinstance(feature, (str, os.PathLike)): shapefile_path = self.resolve_shapefile_path(feature) - elif isinstance(feature, list): + elif isinstance(feature, (list, tuple, np.ndarray)): shapefile_path = self.model_ws / f"ad{len(self._addict)}.shp" features_to_shapefile(feature, "polygon", shapefile_path) else: