From 699e436e994ed1d6af53d664fb95277595b54004 Mon Sep 17 00:00:00 2001 From: 4b15ed2b2aa792ca33dff5066283067e <4b15ed2b2aa792ca33dff5066283067e@app-learninglab.inria.fr> Date: Fri, 30 Apr 2021 20:05:13 +0000 Subject: [PATCH] no commit message --- module2/exo1/toy_notebook_en.ipynb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/module2/exo1/toy_notebook_en.ipynb b/module2/exo1/toy_notebook_en.ipynb index bc1ba58..229aad1 100644 --- a/module2/exo1/toy_notebook_en.ipynb +++ b/module2/exo1/toy_notebook_en.ipynb @@ -13,7 +13,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -39,7 +39,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -48,7 +48,7 @@ "3.128911138923655" ] }, - "execution_count": 2, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -72,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -92,13 +92,13 @@ "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "np.random.seed(seed=42)\n", - "N=1000\n", - "x=np.random.uniform(size=N, low=0, high=1)\n", - "y=np.random.uniform(size=N, low=0, high=1)\n", - "accept=(x*x+y*y)<=1\n", - "reject=np.logical_not(accept)\n", + "N = 1000\n", + "x = np.random.uniform(size=N, low=0, high=1)\n", + "y = np.random.uniform(size=N, low=0, high=1)\n", + "accept = (x*x+y*y)<=1\n", + "reject = np.logical_not(accept)\n", "\n", - "fig, ax=plt.subplots(1)\n", + "fig, ax = plt.subplots(1)\n", "ax.scatter(x[accept], y[accept], c='b', alpha=0.2, edgecolor=None)\n", "ax.scatter(x[reject], y[reject], c='r', alpha=0.2, edgecolor=None)\n", "ax.set_aspect('equal')" @@ -113,7 +113,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -122,7 +122,7 @@ "3.112" ] }, - "execution_count": 4, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } -- 2.18.1