diff --git a/src/iterative_ensemble_smoother/experimental.py b/src/iterative_ensemble_smoother/experimental.py index 632c23af..a11d914d 100644 --- a/src/iterative_ensemble_smoother/experimental.py +++ b/src/iterative_ensemble_smoother/experimental.py @@ -306,8 +306,6 @@ def correlation_threshold(ensemble_size: int) -> float: if np.all(~unique_row): continue - # Get the parameters (X) that have identical significant responses (Y) - X_subset = X[indices_of_row, :] Y_subset = Y[unique_row, :] # Compute the masked arrays for these variables @@ -332,7 +330,7 @@ def correlation_threshold(ensemble_size: int) -> float: Y=Y_subset, cov_YY=cov_YY_subset, # Passing cov(Y, Y) avoids re-computation ) - X_out[indices_of_row, :] = X_subset + cov_XY_subset @ T + X_out[indices_of_row, :] += cov_XY_subset @ T return X_out