Skip to content

Commit

Permalink
Deriving logprob for max
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhruvanshu-Joshi committed Jul 15, 2023
1 parent 6f136d7 commit 0c9f112
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymc/logprob/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ def find_measurable_max(fgraph: FunctionGraph, node: Node) -> Optional[List[Tens
# Non-univariate non-RVs must be rejected
if (

Check warning on line 82 in pymc/logprob/order.py

View check run for this annotation

Codecov / codecov/patch

pymc/logprob/order.py#L82

Added line #L82 was not covered by tests
not isinstance(base_var.owner.op, RandomVariable)
and base_var.owner.inputs[0].owner.op.ndim_supp == 0
and base_var.owner.inputs[0].owner.op.ndim_supp != 0
):
return None

Check warning on line 86 in pymc/logprob/order.py

View check run for this annotation

Codecov / codecov/patch

pymc/logprob/order.py#L86

Added line #L86 was not covered by tests

# TODO: We are currently only supporting continuous rvs
if base_var.owner.op.dtype.startswith("int"):
if isinstance(base_var.owner.op, RandomVariable) and base_var.owner.op.dtype.startswith("int"):
return None

Check warning on line 90 in pymc/logprob/order.py

View check run for this annotation

Codecov / codecov/patch

pymc/logprob/order.py#L89-L90

Added lines #L89 - L90 were not covered by tests

# univariate i.i.d. test which also rules out other distributions
Expand Down

0 comments on commit 0c9f112

Please sign in to comment.