Skip to content

Commit

Permalink
Handle some other distributions which have r_v.owner.op.name = None (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanbabbar04 authored Aug 13, 2024
1 parent a8d20b7 commit 9c7bde3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions preliz/ppls/pymc_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ def get_model_information(model): # pylint: disable=too-many-locals
size = r_v_eval.size
shape = r_v_eval.shape
nc_parents = non_constant_parents(r_v, model.free_RVs)

name = r_v.owner.op.name
name = (
r_v.owner.op.name if r_v.owner.op.name else str(r_v.owner.op).split("RV", 1)[0].lower()
)
dist = pymc_to_preliz[name]
p_model[r_v.name] = dist
if nc_parents:
Expand Down

0 comments on commit 9c7bde3

Please sign in to comment.