Skip to content

Commit 21ffe09

Browse files
committed
fix: need to ensure images always hold jax arrays
1 parent 58efd99 commit 21ffe09

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

jax_galsim/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __init__(self, *args, **kwargs):
102102
)
103103
else:
104104
if "array" in kwargs:
105-
array = kwargs.pop("array")
105+
array = jnp.array(kwargs.pop("array"))
106106
array, xmin, ymin = self._get_xmin_ymin(
107107
array, kwargs, check_bounds=_check_bounds
108108
)

jax_galsim/interpolatedimage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def __init__(
516516

517517
if calculate_stepk or calculate_maxk or flux is not None:
518518
image.array = equinox.error_if(
519-
image.array,
519+
jnp.array(image.array),
520520
image.array.sum() == 0.0,
521521
"This input image has zero total flux. It does not define a "
522522
"valid surface brightness profile.",

tests/GalSim

0 commit comments

Comments
 (0)