Commit 68760567 authored by Nathaniel Callens's avatar Nathaniel Callens

changes

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