Skip to content

Commit 0c1aeb0

Browse files
committed
Fixed deprecation bug in SPM.score().
1 parent 2376df4 commit 0c1aeb0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/qinfer/test_models.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,13 @@ def score(self, outcomes, modelparams, expparams, return_L=False):
188188
new_eps['w_'] = 0
189189
new_eps['t'] = expparams
190190

191-
return super(SimplePrecessionModel, self).score(outcomes, modelparams, new_eps, return_L)
192-
191+
q = super(SimplePrecessionModel, self).score(outcomes, modelparams, new_eps, return_L=False)
192+
193+
if return_L:
194+
return q, self.likelihood(outcomes, modelparams, expparams)
195+
else:
196+
return q
197+
193198
class CoinModel(FiniteOutcomeModel, DifferentiableModel):
194199
r"""
195200
Arguably the simplest possible model; the unknown model parameter

0 commit comments

Comments
 (0)