Skip to content

Commit 6b1ca4f

Browse files
committed
review
1 parent 529e99f commit 6b1ca4f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

petab/v1/priors.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,11 @@ def from_par_dict(
277277
at the bounds. **deprecated**.
278278
:return: A distribution object.
279279
"""
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
280+
dist_type = C.PARAMETER_SCALE_UNIFORM
281+
if (_table_dist_type := d.get(f"{type_}PriorType")) and (
282+
isinstance(_table_dist_type, str) or not np.isnan(_table_dist_type)
284283
):
285-
dist_type = C.PARAMETER_SCALE_UNIFORM
284+
dist_type = _table_dist_type
286285

287286
pscale = d.get(C.PARAMETER_SCALE, C.LIN)
288287
params = d.get(f"{type_}PriorParameters", None)

0 commit comments

Comments
 (0)