Skip to content

Commit d30a78d

Browse files
authored
Fix order of operations in hungarian conflict resolution conditional
1 parent 9e81453 commit d30a78d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/arnie/pk_predictors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _hungarian(bpp, exp=1, sigmoid_slope_factor=None, prob_to_0_threshold_prior=
170170

171171
if len(bps) == 1:
172172
bp_list.extend(bps)
173-
elif len(bps) > 2 and bps[0][0] in bps[-1] or bps[0][1] in bps[-1]:
173+
elif len(bps) > 2 and (bps[0][0] in bps[-1] or bps[0][1] in bps[-1]):
174174
# We have a cycle. We need to try both excluding the first element and excluding
175175
# the last element (only one or the other, or neither, can be present since they conflict)
176176
(bp_list_a,prob_a) = _max_weight_independent_set(bps[1:], bpp_orig)

0 commit comments

Comments
 (0)