diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index 183e6929233a08ba53b5327c0f8db9115df01319..c8cef5c40850ddaab21132e2927dc808a98fec3b 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -76,7 +76,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 46, "metadata": {}, "outputs": [ { @@ -93,14 +93,17 @@ } ], "source": [ - "%matplotlib inline\n", + "%matplotlib inline \n", "import matplotlib.pyplot as plt\n", + "\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", + "\n", "accept = (x*x+y*y) <= 1\n", "reject = np.logical_not(accept)\n", + "\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",