Skip to content

Commit

Permalink
Move noise generation outside if-statment
Browse files Browse the repository at this point in the history
If not, ert will crash when used with row scaling
  • Loading branch information
dafeda committed Jan 3, 2023
1 parent 02cc400 commit a4ed2c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ert/analysis/_es_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ def analysis_ES(
temp_storage, update_step.row_scaling_parameters
)

ensemble_size = A.shape[1] if A is not None else 0
noise = rng.standard_normal(size=(num_obs, ensemble_size))
if A is not None:
ensemble_size = A.shape[1]
num_params = A.shape[0]
noise = rng.standard_normal(size=(num_obs, ensemble_size))
if module.localization():
A_ES_loc = []
for i in range(num_params):
Expand Down

0 comments on commit a4ed2c1

Please sign in to comment.