Skip to content

Commit 4d6a5ad

Browse files
committed
update notebook
1 parent b153fbe commit 4d6a5ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/source/notebooks/blackbox_external_likelihood.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"import theano\n",
5252
"import theano.tensor as tt\n",
5353
"\n",
54-
"print(\"Running on PyMC3 v{}\".format(pm.__version__))"
54+
"print(f\"Running on PyMC3 v{pm.__version__}\")"
5555
]
5656
},
5757
{
@@ -697,7 +697,7 @@
697697
" color=colors[i],\n",
698698
" hist_kwargs={\"density\": True},\n",
699699
" **hist2dkwargs,\n",
700-
" truths=[mtrue, ctrue]\n",
700+
" truths=[mtrue, ctrue],\n",
701701
" )\n",
702702
" else:\n",
703703
" corner.corner(\n",
@@ -729,15 +729,15 @@
729729
"test_grad_op_func = theano.function([var], test_grad_op(var))\n",
730730
"grad_vals = test_grad_op_func([mtrue, ctrue])\n",
731731
"\n",
732-
"print('Gradient returned by \"LogLikeGrad\": {}'.format(grad_vals))\n",
732+
"print(f'Gradient returned by \"LogLikeGrad\": {grad_vals}')\n",
733733
"\n",
734734
"# test the gradient called through LogLikeWithGrad\n",
735735
"test_gradded_op = LogLikeWithGrad(my_loglike, data, x, sigma)\n",
736736
"test_gradded_op_grad = tt.grad(test_gradded_op(var), var)\n",
737737
"test_gradded_op_grad_func = theano.function([var], test_gradded_op_grad)\n",
738738
"grad_vals_2 = test_gradded_op_grad_func([mtrue, ctrue])\n",
739739
"\n",
740-
"print('Gradient returned by \"LogLikeWithGrad\": {}'.format(grad_vals_2))\n",
740+
"print(f'Gradient returned by \"LogLikeWithGrad\": {grad_vals_2}')\n",
741741
"\n",
742742
"# test the gradient that PyMC3 uses for the Normal log likelihood\n",
743743
"test_model = pm.Model()\n",
@@ -751,7 +751,7 @@
751751
" gradfunc.set_extra_values({\"m_interval__\": mtrue, \"c_interval__\": ctrue})\n",
752752
" grad_vals_pymc3 = gradfunc(np.array([mtrue, ctrue]))[1] # get dlogp values\n",
753753
"\n",
754-
"print('Gradient returned by PyMC3 \"Normal\" distribution: {}'.format(grad_vals_pymc3))"
754+
"print(f'Gradient returned by PyMC3 \"Normal\" distribution: {grad_vals_pymc3}')"
755755
]
756756
},
757757
{

0 commit comments

Comments
 (0)