Skip to content

Commit

Permalink
Updated wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronzedwick committed Sep 20, 2024
1 parent 1888885 commit 8fca85a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def test_calculate_total_face_area_sphere(self):
"""Computes the total face area of an MPAS mesh that lies on a unit
sphere, with an expected total face area of 4pi."""
mpas_grid_path = current_path / 'meshfiles' / "mpas" / "QU" / 'mesh.QU.1920km.151026.nc'
enable_jit()
disable_jit()
primal_grid = ux.open_grid(mpas_grid_path, use_dual=False)
dual_grid = ux.open_grid(mpas_grid_path, use_dual=True)

Expand Down
6 changes: 3 additions & 3 deletions uxarray/utils/numba_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import uxarray.constants

from uxarray.constants import ENABLE_JIT
from numba import njit


Expand Down Expand Up @@ -51,9 +51,9 @@ def disable_jit():
uxarray.constants.ENABLE_JIT = False


def ux_njit(enable_jit=uxarray.constants.ENABLE_JIT, **kwargs):
def ux_njit(**kwargs):
def wrapper(func):
if enable_jit:
if ENABLE_JIT:
return njit(func, **kwargs)
return func

Expand Down

0 comments on commit 8fca85a

Please sign in to comment.