Commit 68760567 authored by Nathaniel Callens's avatar Nathaniel Callens

changes

parent da4cfd74
......@@ -120,7 +120,7 @@
},
{
"cell_type": "code",
"execution_count": 372,
"execution_count": 402,
"id": "434e4d2f",
"metadata": {},
"outputs": [],
......@@ -150,12 +150,12 @@
" print(new_e[r][c])\n",
" print(np.linalg.solve(A,y)[-1])\n",
" print(new_e[r][c] + np.linalg.solve(A,y)[-1])\n",
" print(np.ceil(new_e[r][c] + np.linalg.solve(A,y)[-1]))\n",
" print(np.ceil(new_e[r][c]) + np.floor(np.linalg.solve(A,y)[-1]))\n",
" \n",
" #Real solution that works, DO NOT DELETE\n",
" new_e[r][c] = int(np.ceil(new_e[r][c] + np.linalg.solve(A,y)[-1])) \n",
" \n",
" #new_e[r][c] = new_e[r][c] + np.ceil(np.linalg.solve(A,y)[-1])\n",
" #new_e[r][c] = np.ceil(new_e[r][c]) + np.floor(np.linalg.solve(A,y)[-1])\n",
" \n",
" return new_e.astype(int)\n",
" "
......@@ -163,8 +163,8 @@
},
{
"cell_type": "code",
"execution_count": 373,
"id": "ef632a8f",
"execution_count": 403,
"id": "8d835626",
"metadata": {},
"outputs": [
{
......@@ -172,9 +172,9 @@
"output_type": "stream",
"text": [
"3.499999999992724\n",
"[22627.5]\n",
"[22631.]\n",
"[22631.]\n"
"[13644.5]\n",
"[13648.]\n",
"[13648.]\n"
]
}
],
......@@ -184,29 +184,24 @@
},
{
"cell_type": "code",
"execution_count": 374,
"id": "6e6fb5cd",
"execution_count": 420,
"id": "b54c4328",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[ True, True, True, ..., True, True, True],\n",
" [ True, True, True, ..., True, True, True],\n",
" [ True, True, True, ..., True, True, True],\n",
" ...,\n",
" [ True, True, True, ..., True, True, True],\n",
" [ True, True, True, ..., True, True, True],\n",
" [ True, True, True, ..., True, True, True]])"
"518"
]
},
"execution_count": 374,
"execution_count": 420,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"new_error == im"
"e = np.round(err, 1)\n",
"len(np.unique(e[1:-1, 1:-1]))"
]
}
],
......
......@@ -120,7 +120,7 @@
},
{
"cell_type": "code",
"execution_count": 372,
"execution_count": 402,
"id": "434e4d2f",
"metadata": {},
"outputs": [],
......@@ -150,12 +150,12 @@
" print(new_e[r][c])\n",
" print(np.linalg.solve(A,y)[-1])\n",
" print(new_e[r][c] + np.linalg.solve(A,y)[-1])\n",
" print(np.ceil(new_e[r][c] + np.linalg.solve(A,y)[-1]))\n",
" print(np.ceil(new_e[r][c]) + np.floor(np.linalg.solve(A,y)[-1]))\n",
" \n",
" #Real solution that works, DO NOT DELETE\n",
" new_e[r][c] = int(np.ceil(new_e[r][c] + np.linalg.solve(A,y)[-1])) \n",
" \n",
" #new_e[r][c] = new_e[r][c] + np.ceil(np.linalg.solve(A,y)[-1])\n",
" #new_e[r][c] = np.ceil(new_e[r][c]) + np.floor(np.linalg.solve(A,y)[-1])\n",
" \n",
" return new_e.astype(int)\n",
" "
......@@ -163,8 +163,8 @@
},
{
"cell_type": "code",
"execution_count": 373,
"id": "ef632a8f",
"execution_count": 403,
"id": "8d835626",
"metadata": {},
"outputs": [
{
......@@ -172,9 +172,9 @@
"output_type": "stream",
"text": [
"3.499999999992724\n",
"[22627.5]\n",
"[22631.]\n",
"[22631.]\n"
"[13644.5]\n",
"[13648.]\n",
"[13648.]\n"
]
}
],
......@@ -184,29 +184,24 @@
},
{
"cell_type": "code",
"execution_count": 374,
"id": "6e6fb5cd",
"execution_count": 420,
"id": "b54c4328",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[ True, True, True, ..., True, True, True],\n",
" [ True, True, True, ..., True, True, True],\n",
" [ True, True, True, ..., True, True, True],\n",
" ...,\n",
" [ True, True, True, ..., True, True, True],\n",
" [ True, True, True, ..., True, True, True],\n",
" [ True, True, True, ..., True, True, True]])"
"518"
]
},
"execution_count": 374,
"execution_count": 420,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"new_error == im"
"e = np.round(err, 1)\n",
"len(np.unique(e[1:-1, 1:-1]))"
]
}
],
......
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