Skip to content

Commit ee84688

Browse files
author
sushmit
committed
adding files
1 parent 6dcf7f4 commit ee84688

16 files changed

+100
-26
lines changed

.ipynb_checkpoints/Chapter11-checkpoint.ipynb

Lines changed: 65 additions & 16 deletions
Large diffs are not rendered by default.

Chapter11.ipynb

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 110,
5+
"execution_count": 2,
66
"metadata": {
77
"collapsed": false
88
},
@@ -37,17 +37,17 @@
3737
},
3838
{
3939
"cell_type": "code",
40-
"execution_count": 102,
40+
"execution_count": 4,
4141
"metadata": {
4242
"collapsed": false
4343
},
4444
"outputs": [],
4545
"source": [
4646
"# Task 11.6.1\n",
47-
"ret_images=load_images('/Users/sushmitroy/Linear_algebra_coding/faces')\n",
47+
"ret_images=load_images('faces')\n",
4848
"# Create domain for images\n",
49-
"D = {(x,y) for x in range(166) for y in range(189)}\n",
5049
"m,n = 189, 166\n",
50+
"D = {(x,y) for x in range(n) for y in range(m)}\n",
5151
"dict_images = {}\n",
5252
"# Creating the dictionary \n",
5353
"for key in ret_images:\n",
@@ -74,7 +74,7 @@
7474
},
7575
{
7676
"cell_type": "code",
77-
"execution_count": 105,
77+
"execution_count": 6,
7878
"metadata": {
7979
"collapsed": false
8080
},
@@ -89,7 +89,7 @@
8989
},
9090
{
9191
"cell_type": "code",
92-
"execution_count": 111,
92+
"execution_count": 7,
9393
"metadata": {
9494
"collapsed": false
9595
},
@@ -101,24 +101,49 @@
101101
},
102102
{
103103
"cell_type": "code",
104-
"execution_count": 113,
104+
"execution_count": 13,
105105
"metadata": {
106106
"collapsed": false
107107
},
108108
"outputs": [
109+
{
110+
"name": "stdout",
111+
"output_type": "stream",
112+
"text": [
113+
"\n",
114+
" 0 1\n",
115+
" --------------\n",
116+
" 0 | 0.707 0.577\n",
117+
" 1 | 0.707 -0.577\n",
118+
" 2 | 0 0.577\n",
119+
"\n",
120+
"\n",
121+
" 0 1 2\n",
122+
"---------\n",
123+
" 10 20 30\n"
124+
]
125+
},
109126
{
110127
"data": {
111128
"text/plain": [
112-
"Mat(({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}), {(14, 14): 3490.2353553651055, (13, 13): 3554.8686393380212, (0, 0): 20923.486328041065, (3, 3): 8571.324902340108, (6, 6): 5107.829703166606, (5, 5): 5160.144261000115, (18, 18): 2549.608995590782, (11, 11): 4082.9918420019403, (9, 9): 4480.762914620123, (17, 17): 2955.7257805007816, (10, 10): 4118.681714324726, (8, 8): 4595.613498145862, (16, 16): 3121.2003437902304, (12, 12): 3827.5028461739685, (2, 2): 10184.697156718108, (7, 7): 4904.8524998959965, (15, 15): 3224.2488525191366, (1, 1): 12810.3335028356, (4, 4): 6739.850128295617, (19, 19): 3.5340809662939475e-11})"
129+
"{(0, 0): 0.7071067811865475,\n",
130+
" (0, 1): 0.5773502691896258,\n",
131+
" (1, 0): 0.7071067811865475,\n",
132+
" (1, 1): -0.5773502691896258,\n",
133+
" (2, 1): 0.5773502691896258}"
113134
]
114135
},
115-
"execution_count": 113,
136+
"execution_count": 13,
116137
"metadata": {},
117138
"output_type": "execute_result"
118139
}
119140
],
120141
"source": [
121-
"w"
142+
"print(test_M)\n",
143+
"print(test_x)\n",
144+
"M_f = {(0,0):1/sqrt(2) , (1,0):1/sqrt(2) , (0,1):1/sqrt(3), (1,1):-1/sqrt(3), (2,1):1/sqrt(3)}\n",
145+
"\n",
146+
"M_f"
122147
]
123148
}
124149
],

__pycache__/GF2.cpython-35.pyc

3 Bytes
Binary file not shown.

__pycache__/QR.cpython-35.pyc

3 Bytes
Binary file not shown.
3 Bytes
Binary file not shown.
3 Bytes
Binary file not shown.

__pycache__/image.cpython-35.pyc

3 Bytes
Binary file not shown.
3 Bytes
Binary file not shown.

__pycache__/mat.cpython-35.pyc

3 Bytes
Binary file not shown.

__pycache__/matutil.cpython-35.pyc

3 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)