Skip to content

Commit

Permalink
refactor(autotest): refactor numpy imports (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhughes-usgs authored Mar 9, 2022
1 parent 3c39b81 commit c370efa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions pymake/autotest/autotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
import shutil
import textwrap

import numpy as np

ignore_ext = (
".hds",
".hed",
Expand Down Expand Up @@ -1049,6 +1047,8 @@ def compare_budget(
than max_cumpd and max_incpd
"""
import numpy as np

try:
import flopy
except:
Expand Down Expand Up @@ -1255,6 +1255,8 @@ def compare_swrbudget(
than max_cumpd and max_incpd
"""
import numpy as np

try:
import flopy
except:
Expand Down Expand Up @@ -1475,6 +1477,8 @@ def compare_heads(
boolean indicating if the head differences are less than htol.
"""
import numpy as np

try:
import flopy
except:
Expand Down Expand Up @@ -1871,6 +1875,8 @@ def compare_concs(
-------
"""
import numpy as np

try:
import flopy
except:
Expand Down Expand Up @@ -2281,6 +2287,8 @@ def _calculate_diffmax(v1, v2):
absolute value of the maximum difference.
"""
import numpy as np

if v1.ndim > 1 or v2.ndim > 1:
v1 = v1.flatten()
v2 = v2.flatten()
Expand Down Expand Up @@ -2317,6 +2325,8 @@ def _calculate_difftol(v1, v2, tol):
specified tolerance.
"""
import numpy as np

if v1.ndim > 1 or v2.ndim > 1:
v1 = v1.flatten()
v2 = v2.flatten()
Expand Down
2 changes: 1 addition & 1 deletion pymake/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__author__ = "Joseph D. Hughes"
__date__ = "March 2, 2022"
__version__ = "1.2.4"
__version__ = "1.2.5"
__maintainer__ = "Joseph D. Hughes"
__email__ = "[email protected]"
__status__ = "Production"
Expand Down

0 comments on commit c370efa

Please sign in to comment.