Skip to content

Commit 64dcf5d

Browse files
Special case for bands_list=:None
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
1 parent 295128f commit 64dcf5d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

terratorch/datasets/generic_pixel_wise_dataset.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ def _generate_bands_intervals(self, bands_intervals:List[List[int]] = None):
184184
return sorted(sum(bands, []))
185185

186186
def _bands_defined_by_interval(self, bands_list: list[int] | list[list[int]] = None) -> bool:
187-
if all([type(band)==int or isinstance(band, HLSBands) for band in bands_list]):
187+
if not bands_list:
188+
return False
189+
elif all([type(band)==int or isinstance(band, HLSBands) for band in bands_list]):
188190
return False
189191
elif all([isinstance(subinterval, list) for subinterval in bands_list]):
190192
if all([type(band)==int for band in sum(bands_list, [])]):

0 commit comments

Comments
 (0)