Skip to content

Commit

Permalink
Update inference_parameter.py
Browse files Browse the repository at this point in the history
Cast `lb` and `ub` as `floats` when they are pulled from the config.
  • Loading branch information
emprzy committed Nov 22, 2024
1 parent f680be3 commit aeb230b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flepimop/gempyor_pkg/src/gempyor/inference_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def add_modifier(self, pname, ptype, parameter_config, subpops):
pname=pname,
subpop=sp,
pdist=parameter_config["value"].as_random_distribution(),
lb=parameter_config["value"]["a"].get(),
ub=parameter_config["value"]["b"].get(),
lb=float(parameter_config["value"]["a"].get()),
ub=float(parameter_config["value"]["b"].get()),
)

# grouped subpop have one parameter per group
Expand All @@ -65,8 +65,8 @@ def add_modifier(self, pname, ptype, parameter_config, subpops):
pname=pname,
subpop=",".join(group),
pdist=parameter_config["value"].as_random_distribution(),
lb=parameter_config["value"]["a"].get(),
ub=parameter_config["value"]["b"].get(),
lb=float(parameter_config["value"]["a"].get()),
ub=float(parameter_config["value"]["b"].get()),
)

def add_single_parameter(self, ptype, pname, subpop, pdist, lb, ub):
Expand Down

0 comments on commit aeb230b

Please sign in to comment.