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 540710d commit 6fffafbCopy full SHA for 6fffafb
petab/v1/priors.py
@@ -224,10 +224,8 @@ def from_par_dict(
224
dist_type = C.PARAMETER_SCALE_UNIFORM
225
226
pscale = d.get(C.PARAMETER_SCALE, C.LIN)
227
- if (
228
- pd.isna(d[f"{type_}PriorParameters"])
229
- and dist_type == C.PARAMETER_SCALE_UNIFORM
230
- ):
+ params = d.get(f"{type_}PriorParameters", None)
+ if pd.isna(params) and dist_type == C.PARAMETER_SCALE_UNIFORM:
231
params = (
232
scale(d[C.LOWER_BOUND], pscale),
233
scale(d[C.UPPER_BOUND], pscale),
@@ -236,7 +234,7 @@ def from_par_dict(
236
234
params = tuple(
237
235
map(
238
float,
239
- d[f"{type_}PriorParameters"].split(C.PARAMETER_SEPARATOR),
+ params.split(C.PARAMETER_SEPARATOR),
240
)
241
242
return Prior(
0 commit comments