diff --git a/module2/exo1/toy_notebook_en.ipynb b/module2/exo1/toy_notebook_en.ipynb index bc1ba581dfb2b4b0e1a0e0ae1052c96438ce3caf..229aad1d380a8ff71e827fff740cc73f40fc6c43 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" }