diff --git a/introduction_to_bayes_smc.ipynb b/introduction_to_bayes_smc.ipynb index c87e14d..314d292 100644 --- a/introduction_to_bayes_smc.ipynb +++ b/introduction_to_bayes_smc.ipynb @@ -296,6 +296,9 @@ " def likelihood(self, outcomes, modelparams, expparams):\n", " # Finally, we calculate the likelihood function\n", " # Again, call some necessary internal functions.\n", + " expparams = np.asarray(expparams,dtype=self.expparams_dtype)\n", + " if len(expparams.shape) == 0:\n", + " expparams = expparams.reshape(-1)\n", " super(CoinFlipsModel,self).likelihood(outcomes, modelparams, expparams)\n", " \n", " # The tensor storing the values of the likelihood has the following expected shape.\n",