Skip to content

Commit 52a1812

Browse files
committed
--
1 parent 9d173f8 commit 52a1812

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

petab/v2/petab1to2.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -460,15 +460,15 @@ def update_prior_pars(row):
460460
prior_type = row.get(v2.C.PRIOR_DISTRIBUTION)
461461
prior_pars = row.get(v2.C.PRIOR_PARAMETERS)
462462

463-
if prior_type not in (v2.C.UNIFORM, v2.C.LOG_UNIFORM) or not pd.isna(
463+
if prior_type in (v2.C.UNIFORM, v2.C.LOG_UNIFORM) and pd.isna(
464464
prior_pars
465465
):
466-
return prior_pars
466+
return (
467+
f"{row[v2.C.LOWER_BOUND]}{v2.C.PARAMETER_SEPARATOR}"
468+
f"{row[v2.C.UPPER_BOUND]}"
469+
)
467470

468-
return (
469-
f"{row[v2.C.LOWER_BOUND]}{v2.C.PARAMETER_SEPARATOR}"
470-
f"{row[v2.C.UPPER_BOUND]}"
471-
)
471+
return prior_pars
472472

473473
df[v2.C.PRIOR_PARAMETERS] = df.apply(update_prior_pars, axis=1)
474474

0 commit comments

Comments
 (0)