Should the output look like this instead of always returning a tuple (including a tuple of 1 when just images are returned):
def __get_item__(self, index, ...):
...
if not self.targets and not return_wcs:
return img
else:
output = [img]
if self.targets:
output += [targets]
if return_wcs:
output += [wcs_]
return output
Should the output look like this instead of always returning a tuple (including a tuple of 1 when just images are returned):