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 529e99f commit 6b1ca4fCopy full SHA for 6b1ca4f
petab/v1/priors.py
@@ -277,12 +277,11 @@ def from_par_dict(
277
at the bounds. **deprecated**.
278
:return: A distribution object.
279
"""
280
- dist_type = d.get(f"{type_}PriorType", C.PARAMETER_SCALE_UNIFORM)
281
- if (
282
- (not isinstance(dist_type, str) and np.isnan(dist_type))
283
- or not dist_type
+ dist_type = C.PARAMETER_SCALE_UNIFORM
+ if (_table_dist_type := d.get(f"{type_}PriorType")) and (
+ isinstance(_table_dist_type, str) or not np.isnan(_table_dist_type)
284
):
285
- dist_type = C.PARAMETER_SCALE_UNIFORM
+ dist_type = _table_dist_type
286
287
pscale = d.get(C.PARAMETER_SCALE, C.LIN)
288
params = d.get(f"{type_}PriorParameters", None)
0 commit comments