Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(zonebud): reapply OrderedDict to dict changes from PR #1201 #1210

Merged
merged 2 commits into from
Aug 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions flopy/utils/zonbud.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import copy
import numpy as np
from itertools import groupby
from collections import OrderedDict
from .utils_def import totim_to_datetime


Expand Down Expand Up @@ -152,9 +151,7 @@ def __init__(

self.izone = izone
self.allzones = np.unique(izone)
self._zonenamedict = OrderedDict(
[(z, "ZONE_{}".format(z)) for z in self.allzones]
)
self._zonenamedict = {z: "ZONE_{}".format(z) for z in self.allzones}

if aliases is not None:
s = (
Expand Down Expand Up @@ -2199,10 +2196,8 @@ def __init__(self, model, izone, extension=".zon", aliases=None):
self._parent.add_package("zon", self)
self.filename = self._parent.name + extension
self.aliases = aliases
self.allzones = [int(zn) for zn in np.unique(izone) if zn != 0]
self._zonenamedict = OrderedDict(
[(zn, "ZONE_{}".format(zn)) for zn in self.allzones]
)
self.allzones = [int(z) for z in np.unique(izone) if z != 0]
self._zonenamedict = {z: "ZONE_{}".format(z) for z in self.allzones}

if aliases is not None:
if not isinstance(aliases, dict):
Expand Down