From e98cbc1e82fa997df98b1b8508e7ebbe4272be7f Mon Sep 17 00:00:00 2001 From: f17b59eb16a55678f62ed05901ca5c81 Date: Sun, 5 Apr 2020 19:05:43 +0000 Subject: [PATCH] Save --- module2/exo1/toy_notebook_fr.ipynb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index f181f87..f8c4b9d 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## En demandant à la lib maths \n", + "## En demandant à la lib maths\n", "Mon ordinateur m'indique que $\\pi$ vaut *approximativement*" ] }, @@ -93,8 +93,9 @@ } ], "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", @@ -103,6 +104,7 @@ "\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", -- 2.18.1