From 33a3db6049fffa7b5fa91ff878e68b51242bf81e Mon Sep 17 00:00:00 2001 From: Tom Donoghue Date: Mon, 9 Sep 2024 09:31:51 -0400 Subject: [PATCH] fix param copying --- neurodsp/sim/update.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neurodsp/sim/update.py b/neurodsp/sim/update.py index 3fc7c12d..a1708a35 100644 --- a/neurodsp/sim/update.py +++ b/neurodsp/sim/update.py @@ -159,13 +159,14 @@ class ParamIter(BaseUpdater): def __init__(self, params, update, values, component=None): """Initialize parameter iteration object.""" - BaseUpdater.__init__(self, params) - + params = deepcopy(params) if component is not None: params['components'][component][update] = None else: params[update] = None + BaseUpdater.__init__(self, params) + self.update = update self.values = values self.component = component