Skip to content

Commit a0f3111

Browse files
committed
add a helpful error msg
1 parent a05ccb0 commit a0f3111

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
@@ -190,6 +190,8 @@ def reproject_and_coadd(
190190
xc_out, yc_out = wcs_out.low_level_wcs.celestial.world_to_pixel(wcs_in.celestial.pixel_to_world(xc, yc))
191191
zc_out = wcs_out.low_level_wcs.spectral.world_to_pixel(wcs_in.spectral.pixel_to_world(zc))
192192
shape_out_cel = shape_out[1:]
193+
else:
194+
raise ValueError(f"Wrong number of dimensions: {array_in.ndim}")
193195

194196
# Determine the cutout parameters
195197

0 commit comments

Comments
 (0)