Skip to content

Commit 93309d2

Browse files
authored
Merge pull request #1077 from UXARRAY/philipc2/disable-numba-for-tests
Disable `numba` for code coverage
2 parents 8fc8d52 + dfd9c76 commit 93309d2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,16 @@ jobs:
6262
run: |
6363
conda list
6464
65+
6566
- name: Run Namespace Tests
6667
run: |
6768
python -m pytest test
6869
6970
- name: Run Coverage Tests
7071
run: |
7172
python -m pytest test -v --cov=./uxarray --cov-report=xml
73+
env:
74+
NUMBA_DISABLE_JIT: 1
7275

7376
- name: Upload code coverage to Codecov
7477
if: github.repository == 'UXARRAY/uxarray'

uxarray/grid/coordinates.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import xarray as xr
22
import numpy as np
3-
import math
43
import warnings
54

65
from uxarray.conventions import ugrid
@@ -53,8 +52,8 @@ def _xyz_to_lonlat_rad_no_norm(
5352
Latitude in radians
5453
"""
5554

56-
lon = math.atan2(y, x)
57-
lat = math.asin(z)
55+
lon = np.atan2(y, x)
56+
lat = np.asin(z)
5857

5958
# set longitude range to [0, pi]
6059
lon = np.mod(lon, 2 * np.pi)
@@ -102,8 +101,8 @@ def _xyz_to_lonlat_rad_scalar(
102101
y /= denom
103102
z /= denom
104103

105-
lon = math.atan2(y, x)
106-
lat = math.asin(z)
104+
lon = np.atan2(y, x)
105+
lat = np.asin(z)
107106

108107
# set longitude range to [0, pi]
109108
lon = np.mod(lon, 2 * np.pi)
@@ -790,8 +789,8 @@ def _xyz_to_lonlat_rad_no_norm(
790789
Latitude in radians
791790
"""
792791

793-
lon = math.atan2(y, x)
794-
lat = math.asin(z)
792+
lon = np.atan2(y, x)
793+
lat = np.asin(z)
795794

796795
# set longitude range to [0, pi]
797796
lon = np.mod(lon, 2 * np.pi)

0 commit comments

Comments
 (0)