Correct convergence test

This commit is contained in:
Jakob Lass
2025-07-14 13:07:04 +02:00
parent 7b34181d75
commit e4c6c1ea29

View File

@@ -617,7 +617,7 @@ class background():
new_loss = 1000000
k = 0
while (np.abs(old_loss - new_loss) > 1e-3) and (k < n_epochs):
while (old_loss - new_loss > 1e-3) and (k < n_epochs):
# Compute A = Y - B by filling the nans with 0s
A = np.where(np.isnan(Y_r - b_tmp) == True, 0.0, Y_r - b_tmp)