Skip to content

Commit

Permalink
Check for length-1 dimension in result
Browse files Browse the repository at this point in the history
  • Loading branch information
dhomeier authored Jan 12, 2023
1 parent f31e88d commit e877e0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glue/core/coordinate_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def pixel2world_single_axis(wcs, *pixel, world_axis=None):
else:
result = wcs.pixel_to_world_values(*pixel)

if len(pixel) > 1:
if len(pixel) > 1 or np.shape(result)[0] == 1:
result = result[world_axis]

return np.broadcast_to(result, original_shape)
Expand Down

0 comments on commit e877e0d

Please sign in to comment.