From 4dc66f7c5e29cd77eed2a3fdee8253d3c91bfb29 Mon Sep 17 00:00:00 2001 From: larsevj Date: Tue, 8 Oct 2024 10:16:04 +0200 Subject: [PATCH] Modify type of parameter configuration --- src/ert/config/design_matrix.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/ert/config/design_matrix.py b/src/ert/config/design_matrix.py index c05790a3ffb..4e8ed2c7fa2 100644 --- a/src/ert/config/design_matrix.py +++ b/src/ert/config/design_matrix.py @@ -97,7 +97,6 @@ def read_design_matrix( # ignoring errors here is deprecated in pandas, should find another solution # design_matrix_sheet = design_matrix_sheet.apply(pd.to_numeric, errors="ignore") - parameter_configuration = {} transform_function_definitions: list[TransformFunctionDefinition] = [] for parameter in design_matrix_df.columns: transform_function_definitions.append( @@ -107,14 +106,16 @@ def read_design_matrix( values=[], ) ) - parameter_configuration[DESIGN_MATRIX_GROUP] = GenKwConfig( - name=DESIGN_MATRIX_GROUP, - forward_init=False, - template_file=None, - output_file=None, - transform_function_definitions=transform_function_definitions, - update=False, - ) + parameter_configuration = [ + GenKwConfig( + name=DESIGN_MATRIX_GROUP, + forward_init=False, + template_file=None, + output_file=None, + transform_function_definitions=transform_function_definitions, + update=False, + ) + ] design_matrix_df.columns = pd.MultiIndex.from_product( [[DESIGN_MATRIX_GROUP], design_matrix_df.columns]