From d30a78db91e3eaa91e7268c93a6b5bcc471eba0f Mon Sep 17 00:00:00 2001 From: Jonathan Romano Date: Fri, 28 Feb 2025 23:09:03 +0000 Subject: [PATCH] Fix order of operations in hungarian conflict resolution conditional --- src/arnie/pk_predictors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arnie/pk_predictors.py b/src/arnie/pk_predictors.py index 4cd8fb1..04073cb 100644 --- a/src/arnie/pk_predictors.py +++ b/src/arnie/pk_predictors.py @@ -170,7 +170,7 @@ def _hungarian(bpp, exp=1, sigmoid_slope_factor=None, prob_to_0_threshold_prior= if len(bps) == 1: bp_list.extend(bps) - elif len(bps) > 2 and bps[0][0] in bps[-1] or bps[0][1] in bps[-1]: + elif len(bps) > 2 and (bps[0][0] in bps[-1] or bps[0][1] in bps[-1]): # We have a cycle. We need to try both excluding the first element and excluding # the last element (only one or the other, or neither, can be present since they conflict) (bp_list_a,prob_a) = _max_weight_independent_set(bps[1:], bpp_orig)