Corresponding code of 'Quiros A.C.+, Coudray N.+, Yeaton A., Yang X., Chiriboga L., Karimkhan A., Narula N., Pass H., Moreira A.L., Le Quesne J.*, Tsirigos A.*, and Yuan K.* Mapping the landscape of histomorphological cancer phenotypes using self-supervised learning on unlabeled, unannotated pathology slides. 2024'
49
stars
12
forks
source link
remove_indexes_h5.py fix: move break logic to start of loop. #6
Before fix, since index is updated at the end of the loop after checking the stop condition, index is incremented past num_tiles and gives an IndexError in next iteration.
Since the error happens after all retained items are copied over, it seems it doesn't cause issues, but the error message can still be misleading or lead to issues in the future if subsequent logic is added.
Before fix, since
index
is updated at the end of the loop after checking the stop condition,index
is incremented pastnum_tiles
and gives an IndexError in next iteration.Since the error happens after all retained items are copied over, it seems it doesn't cause issues, but the error message can still be misleading or lead to issues in the future if subsequent logic is added.