Skip to content

Commit b1329d7

Browse files
authored
Fix condition to check if array shape is 1
1 parent f9f0613 commit b1329d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

jax_galsim/wcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def _cast_to_static_numeric_scalar(x, msg=None):
2929
if x.ndim == 0:
3030
return x.item()
3131

32-
if all(sv for sv in x.shape == 1):
32+
if all(sv == 1 for sv in x.shape):
3333
return x.ravel()[0].item()
3434

3535
msg = msg or f"Cannot convert input {x!r} to a static, numeric scalar."

0 commit comments

Comments
 (0)