Commit 079da60d authored by hakimouaras's avatar hakimouaras

minor modif

parent a9236df9
......@@ -37,7 +37,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 13,
"metadata": {},
"outputs": [
{
......@@ -69,7 +69,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 14,
"metadata": {
"scrolled": true
},
......@@ -80,7 +80,7 @@
"3.128911138923655"
]
},
"execution_count": 10,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
......@@ -113,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 15,
"metadata": {},
"outputs": [
{
......@@ -137,10 +137,11 @@
"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",
"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')"
......@@ -156,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 16,
"metadata": {
"scrolled": true
},
......@@ -167,7 +168,7 @@
"3.112"
]
},
"execution_count": 12,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment