We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2484a7f commit a17aa62Copy full SHA for a17aa62
petab/v1/priors.py
@@ -281,10 +281,8 @@ def from_par_dict(
281
dist_type = C.PARAMETER_SCALE_UNIFORM
282
283
pscale = d.get(C.PARAMETER_SCALE, C.LIN)
284
- if (
285
- pd.isna(d[f"{type_}PriorParameters"])
286
- and dist_type == C.PARAMETER_SCALE_UNIFORM
287
- ):
+ params = d.get(f"{type_}PriorParameters", None)
+ if pd.isna(params) and dist_type == C.PARAMETER_SCALE_UNIFORM:
288
params = (
289
scale(d[C.LOWER_BOUND], pscale),
290
scale(d[C.UPPER_BOUND], pscale),
@@ -293,7 +291,7 @@ def from_par_dict(
293
291
params = tuple(
294
292
map(
295
float,
296
- d[f"{type_}PriorParameters"].split(C.PARAMETER_SEPARATOR),
+ params.split(C.PARAMETER_SEPARATOR),
297
)
298
299
return Prior(
0 commit comments