Skip to content

Commit

Permalink
Reducing redundant code in discrete order
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhruvanshu-Joshi committed Oct 23, 2023
1 parent 9fddde6 commit 894ff27
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pymc/logprob/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,7 @@ def find_measurable_max(fgraph: FunctionGraph, node: Node) -> Optional[List[Tens

# distinguish measurable discrete and continuous (because logprob is different)
if base_var.owner.op.dtype.startswith("int"):
if isinstance(base_var.owner.op, RandomVariable):
measurable_max = MeasurableMaxDiscrete(list(axis))
else:
return None
measurable_max = MeasurableMaxDiscrete(list(axis))

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

View check run for this annotation

Codecov / codecov/patch

pymc/logprob/order.py#L110-L111

Added lines #L110 - L111 were not covered by tests
else:
measurable_max = MeasurableMax(list(axis))

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

View check run for this annotation

Codecov / codecov/patch

pymc/logprob/order.py#L113

Added line #L113 was not covered by tests

Expand Down

0 comments on commit 894ff27

Please sign in to comment.