Closed solvejgdinger closed 5 years ago
Commit 8110695 includes warnings when the end of the imglist is reached and the next image should be loaded. It also raises an IndexError when the index should be changed to an invalid index (i.a. after the last index). The IndexError can be caught when the application requires that.
It seems that the
Imglist.next()
/Imglist.next_img()
method is implemted in a circular way, means it will return the first image when called at the last element of Imglist (e.g. whenImglist.cfn==Imglist.nof
). Did I notice that correctly? It causes probelms if you loop over the Imglist not by using a range of indices but a conditional clause. A warning when the end of the lmglist is reached would be very beneficial for debugging. Or a solution which does not allow any overshooting as it is not meaningful in time series analysis.