Skip to content

Commit

Permalink
Print parameter group dimensions all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
Blunde1 committed Mar 14, 2024
1 parent 3e2e57b commit f34d40c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ert/analysis/_es_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def __getitem__(self, key: str) -> npt.NDArray[np.double]:
if not isinstance(value, xr.DataArray):
return value
ensemble_size = len(value.realizations)
print(f"getitem: Parameter group {key} has shape {value.values.shape}")
return value.values.reshape(ensemble_size, -1).T

def __setitem__(
Expand All @@ -161,6 +162,7 @@ def __setitem__(
old_value.data = value.T.reshape(*old_value.shape)
self.data[key] = old_value
else:
print(f"Parameter group {key} has shape {value.shape}")
self.data[key] = value


Expand Down

0 comments on commit f34d40c

Please sign in to comment.