Skip to content

Commit

Permalink
Revoked error model update, test did not catch it.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-f-alrefaie committed Feb 14, 2025
1 parent 6655365 commit 5c7c46f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/taurex/util/emission.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
import numba
from numba import float64

@numba.vectorize([float64(float64)], fastmath=True, error_model="numpy")
@numba.vectorize([float64(float64)], fastmath=True)
def _convert_lamb(lamb: npt.NDArray[np.float64]) -> npt:
"""Convert wavenumber in :math:`\\mu m` to :math:`m`."""
return 10000 * 1e-6 / lamb

@numba.vectorize([float64(float64, float64)], fastmath=True, error_model="numpy")
@numba.vectorize([float64(float64, float64)], fastmath=True)
def _black_body_vec(wl: npt.NDArray[np.float64], temp: float):
"""Compute black body spectrum."""
return (
Expand All @@ -27,13 +27,13 @@ def _black_body_vec(wl: npt.NDArray[np.float64], temp: float):
* 1e-6
)

@numba.njit(fastmath=True, parallel=False, error_model="numpy")
@numba.njit(fastmath=True, parallel=False)
def black_body_numba(lamb: npt.NDArray[np.float64], temp: float):
"""Compute black body spectrum using numba."""
wl = _convert_lamb(lamb)
return _black_body_vec(wl, temp)

@numba.njit(fastmath=True, parallel=False, error_model="numpy")
@numba.njit(fastmath=True, parallel=False)
def black_body_numba_II(lamb, temp): # noqa: N802
"""Compute black body spectrum (alt algo) using numba."""
n = lamb.shape[0]
Expand Down

0 comments on commit 5c7c46f

Please sign in to comment.