Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions introduction_to_bayes_smc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down