Skip to content

Commit bde9d46

Browse files
committed
add a helpful error msg
1 parent 2bcfc55 commit bde9d46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

reproject/mosaicking/coadd.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ def reproject_and_coadd(
191191
xc_out, yc_out = wcs_out.low_level_wcs.celestial.world_to_pixel(wcs_in.celestial.pixel_to_world(xc, yc))
192192
zc_out = wcs_out.low_level_wcs.spectral.world_to_pixel(wcs_in.spectral.pixel_to_world(zc))
193193
shape_out_cel = shape_out[1:]
194+
else:
195+
raise ValueError(f"Wrong number of dimensions: {array_in.ndim}")
194196

195197
# Determine the cutout parameters
196198

0 commit comments

Comments
 (0)