Skip to content

Commit ebdec57

Browse files
committed
fixed serial mode bug
1 parent a02c055 commit ebdec57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qinfer/smc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def bayes_risk(self, expparams):
563563
# for models whose outcome number changes with experiment, we
564564
# take the easy way out and for-loop over experiments
565565
n_eps = expparams.size
566-
if n_eps > 1 and not np.array_equal(self.model.n_outcomes(expparams), n_out):
566+
if n_eps > 1 and not self.model.is_n_outcomes_constant:
567567
risk = np.empty(n_eps)
568568
for idx in range(n_eps):
569569
risk[idx] = self.bayes_risk(expparams[idx, np.newaxis])
@@ -625,7 +625,7 @@ def expected_information_gain(self, expparams):
625625
# for models whose outcome number changes with experiment, we
626626
# take the easy way out and for-loop over experiments
627627
n_eps = expparams.size
628-
if n_eps > 1 and not np.array_equal(self.model.n_outcomes(expparams), n_out):
628+
if n_eps > 1 and not self.model.is_n_outcomes_constant:
629629
risk = np.empty(n_eps)
630630
for idx in range(n_eps):
631631
risk[idx] = self.expected_information_gain(expparams[idx, np.newaxis])

0 commit comments

Comments
 (0)