Skip to content

Commit a9f5171

Browse files
authored
Apply suggestions from code review
Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
1 parent 3d645a2 commit a9f5171

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

jax_galsim/core/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def check_is_int_then_cast(val, msg):
4545
if val != int(val):
4646
raise TypeError(msg)
4747
val = int(val)
48-
else:
48+
elif not has_tracers(val):
4949
# otherwise we use more opaque checking upon jit via equinox
5050
val = equinox.error_if(
5151
val,

jax_galsim/moffat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(
7373
raise ValueError(
7474
f"JAX-GalSim does not support Moffat beta values <= {self._beta_thr}."
7575
)
76-
else:
76+
elif not has_tracers(beta):
7777
beta = equinox.error_if(
7878
jnp.array(beta),
7979
beta <= self._beta_thr,

0 commit comments

Comments
 (0)