From b003ee1fb6764748517abfde7baca9bb1c786d99 Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Sun, 5 Mar 2023 22:00:20 +0100 Subject: [PATCH] fixes a bug where Prim modifies the experiments array (#228) --- ema_workbench/analysis/prim.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ema_workbench/analysis/prim.py b/ema_workbench/analysis/prim.py index 8c90d6093..658de1f3b 100644 --- a/ema_workbench/analysis/prim.py +++ b/ema_workbench/analysis/prim.py @@ -978,6 +978,8 @@ def __init__( assert mode in {sdutil.RuleInductionType.BINARY, sdutil.RuleInductionType.REGRESSION} assert self._assert_mode(y, mode, update_function) # preprocess x + x = x.copy() + try: x.drop(columns="scenario", inplace=True) except KeyError: