Skip to content

Commit 37310d9

Browse files
committed
fix: add the rest of the types
1 parent 48c2569 commit 37310d9

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

jax_galsim/core/utils.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,31 @@
99
import numpy as np
1010
from jax.tree_util import tree_flatten
1111

12-
CONST_TYPES = (float, int, np.ndarray, np.int32, np.int64, np.float32, np.float64)
12+
CONST_TYPES = (
13+
float,
14+
int,
15+
np.ndarray,
16+
np.int8,
17+
np.int16,
18+
np.int32,
19+
np.int64,
20+
np.float16,
21+
np.float32,
22+
np.float64,
23+
np.complex64,
24+
np.complex128,
25+
)
1326
CONST_TYPES_WITH_JAX = CONST_TYPES + (
1427
jax.Array,
1528
jnp.array,
29+
jnp.int8,
30+
jnp.int16,
1631
jnp.int32,
1732
jnp.int64,
1833
jnp.float32,
1934
jnp.float64,
35+
jnp.complex64,
36+
jnp.complex128,
2037
)
2138

2239

0 commit comments

Comments
 (0)