07: Draft what I did in the practical session modulo what I did on paper for the first one

This commit is contained in:
2022-10-20 12:18:26 +02:00
parent 3903cac16e
commit 3feb6c7e10

View File

@ -20,12 +20,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 1,
"id": "8ce67703", "id": "8ce67703",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"NAME = \"\"\n", "NAME = \"Kees van Kempen\"\n",
"NAMES_OF_COLLABORATORS = \"\"" "NAMES_OF_COLLABORATORS = \"\""
] ]
}, },
@ -62,7 +62,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 2,
"id": "d10dcc0d", "id": "d10dcc0d",
"metadata": { "metadata": {
"deletable": false, "deletable": false,
@ -259,8 +259,8 @@
"source": [ "source": [
"def sample_Y(s,lamb,c):\n", "def sample_Y(s,lamb,c):\n",
" '''Sample Y width density f_Y(y).'''\n", " '''Sample Y width density f_Y(y).'''\n",
" # YOUR CODE HERE\n", " f_Y = lambda y: np.sqrt(c/np.pi)*np.exp(-c*(y - s/c)**2) # \\aprox np.sqrt(c/np.pi)*np.exp(2*c)*rng.normal(s/c, 0)\n",
" raise NotImplementedError()" " f_Z = lambda z: rng.normal()"
] ]
}, },
{ {
@ -577,7 +577,7 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3 (ipykernel)", "display_name": "Python 3",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },