Skip to content

Commit

Permalink
Faster fill_in_parameters_for_condition
Browse files Browse the repository at this point in the history
Avoid unnecessary repeated dict creation.
This matters for problems with large numbers of parameters.
  • Loading branch information
dweindl committed Nov 19, 2024
1 parent a8da9cb commit 1bbe745
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/sdist/amici/petab/conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ def _get_par(model_par, value, mapping):
key: _get_par(key, val, map_sim_fix)
for key, val in map_sim_fix.items()
}
map_sim_fix_var = dict(map_sim_fix, **map_sim_var)
map_sim_var = {
key: _get_par(key, val, dict(map_sim_fix, **map_sim_var))
key: _get_par(key, val, map_sim_fix_var)
for key, val in map_sim_var.items()
}

Expand Down

0 comments on commit 1bbe745

Please sign in to comment.