The FORM.run iteration loop does not actually respect the value of n_iter for breaking out of the loop. This can result in the actual iterations exceeding the value of n_iter, which subsequently produces an IndexError because arrays have been dimensioned by n_iter. The IndexError comes from line 950:
dg_u_record[k + 1, :] = dg_u
IndexError: index 2 is out of bounds for axis 0 with size 2
The
FORM.run
iteration loop does not actually respect the value ofn_iter
for breaking out of the loop. This can result in the actual iterations exceeding the value ofn_iter
, which subsequently produces anIndexError
because arrays have been dimensioned byn_iter
. TheIndexError
comes from line 950:The array is first dimenioned here: https://github.com/SURGroup/UQpy/blob/80884c6578dab6d70a9e83a3e61bf47bdb2e9a99/src/UQpy/Reliability.py#L917
But
n_iter
is not ever accessed until the check that is done after the iteration loop has been exited: https://github.com/SURGroup/UQpy/blob/80884c6578dab6d70a9e83a3e61bf47bdb2e9a99/src/UQpy/Reliability.py#L1045Should be a simple fix to just add another
elif
check that setsconv_flag
to True based onn_iter
.