no commit message

parent 113d27d0
......@@ -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"
}
......
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