From aa1b65e09f115cbaec6b70774314d8bd51c46bf2 Mon Sep 17 00:00:00 2001 From: Julius Parulek Date: Wed, 18 Dec 2024 11:41:18 +0100 Subject: [PATCH] Fixups --- src/ert/config/analysis_config.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ert/config/analysis_config.py b/src/ert/config/analysis_config.py index 9fe1174483e..870c3676edb 100644 --- a/src/ert/config/analysis_config.py +++ b/src/ert/config/analysis_config.py @@ -41,7 +41,7 @@ class AnalysisConfig: ies_module: IESSettings = field(default_factory=IESSettings) observation_settings: UpdateSettings = field(default_factory=UpdateSettings) num_iterations: int = 1 - design_matrices: list[DesignMatrix] = field(default_factory=list) + design_matrix: DesignMatrix | None = None @no_type_check @classmethod @@ -191,6 +191,11 @@ def from_dict(cls, config_dict: ConfigDict) -> AnalysisConfig: DesignMatrix.from_config_list(design_matrix_config_list) for design_matrix_config_list in design_matrix_config_lists ] + design_matrix: DesignMatrix | None = None + if design_matrices: + design_matrix = design_matrices[0] + for dm_other in design_matrices[1:]: + design_matrix = design_matrix.merge_with_other(dm_other) config = cls( max_runtime=config_dict.get(ConfigKeys.MAX_RUNTIME), minimum_required_realizations=min_realization, @@ -198,7 +203,7 @@ def from_dict(cls, config_dict: ConfigDict) -> AnalysisConfig: observation_settings=obs_settings, es_module=es_settings, ies_module=ies_settings, - design_matrices=design_matrices, + design_matrix=design_matrix, ) return config