From 0c9f112f6dbaf32f7b9e4b7d8bbe717c6755dbe9 Mon Sep 17 00:00:00 2001 From: Dhruvanshu-Joshi Date: Sun, 16 Jul 2023 04:51:28 +0530 Subject: [PATCH] Deriving logprob for max --- pymc/logprob/order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymc/logprob/order.py b/pymc/logprob/order.py index 03f99d7e624..b5ee5c3ca65 100644 --- a/pymc/logprob/order.py +++ b/pymc/logprob/order.py @@ -81,12 +81,12 @@ def find_measurable_max(fgraph: FunctionGraph, node: Node) -> Optional[List[Tens # Non-univariate non-RVs must be rejected if ( 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 # 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 # univariate i.i.d. test which also rules out other distributions