Skip to content

Commit f821a69

Browse files
committed
Fixed handling of extra coords
1 parent 26675f6 commit f821a69

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ndcube/ndcube.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def _generate_dependent_world_coords(self, pixel_corners, wcs, needed_axes, unit
550550
ranges = [ranges[i] for i in wcs.mapping]
551551
wcs = wcs.wcs
552552
if wcs is None:
553-
return []
553+
return ()
554554
# This value of zero will be returned as a throwaway for unneeded axes, and a numerical value is
555555
# required so values_to_high_level_objects in the calling function doesn't crash or warn
556556
world_coords = [0] * wcs.world_n_dim
@@ -587,7 +587,7 @@ def _generate_dependent_world_coords(self, pixel_corners, wcs, needed_axes, unit
587587
world_coords[i] = coord << u.Unit(unit)
588588
return world_coords
589589

590-
def _generate_world_coords(self, pixel_corners, wcs, *, needed_axes=None, units=None):
590+
def _generate_world_coords(self, pixel_corners, wcs, *, needed_axes, units=None):
591591
"""
592592
Private method to generate world coordinates.
593593
@@ -609,8 +609,6 @@ def _generate_world_coords(self, pixel_corners, wcs, *, needed_axes=None, units=
609609
array-like
610610
The world coordinates.
611611
"""
612-
if isinstance(wcs, ExtraCoords):
613-
wcs = wcs.wcs
614612
axes_are_independent = []
615613
pixel_axes = set()
616614
for world_axis in needed_axes:

0 commit comments

Comments
 (0)