Skip to content

Commit

Permalink
Add dims to *Ordered probs variables when appropriate (#5084)
Browse files Browse the repository at this point in the history
* Add dims to *Ordered probs variables when appropriate

* Make black happy

* For real about black this time
  • Loading branch information
AustinRochford authored Oct 17, 2021
1 parent e03f5bf commit 598dd9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pymc/distributions/discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ class OrderedLogistic:
def __new__(cls, name, *args, compute_p=True, **kwargs):
out_rv = _OrderedLogistic(name, *args, **kwargs)
if compute_p:
pm.Deterministic(f"{name}_probs", out_rv.owner.inputs[3])
pm.Deterministic(f"{name}_probs", out_rv.owner.inputs[3], dims=kwargs.get("dims"))
return out_rv

@classmethod
Expand Down Expand Up @@ -1856,7 +1856,7 @@ class OrderedProbit:
def __new__(cls, name, *args, compute_p=True, **kwargs):
out_rv = _OrderedProbit(name, *args, **kwargs)
if compute_p:
pm.Deterministic(f"{name}_probs", out_rv.owner.inputs[3])
pm.Deterministic(f"{name}_probs", out_rv.owner.inputs[3], dims=kwargs.get("dims"))
return out_rv

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion pymc/distributions/multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ class OrderedMultinomial:
def __new__(cls, name, *args, compute_p=True, **kwargs):
out_rv = _OrderedMultinomial(name, *args, **kwargs)
if compute_p:
pm.Deterministic(f"{name}_probs", out_rv.owner.inputs[4])
pm.Deterministic(f"{name}_probs", out_rv.owner.inputs[4], dims=kwargs.get("dims"))
return out_rv

@classmethod
Expand Down

0 comments on commit 598dd9d

Please sign in to comment.