Commit 0ca811f5 authored by SINGH SOURABH BHAGWAN's avatar SINGH SOURABH BHAGWAN

also prints the transpose

parent 0f54af9d
3 4 5 5
1 2 3 4 1 2 3 4 5
5 6 7 8 6 7 8 9 10
2 5 6 8 11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
\ No newline at end of file
...@@ -24,10 +24,12 @@ t = open('transpose.txt','w') ...@@ -24,10 +24,12 @@ t = open('transpose.txt','w')
dim = [c,r] dim = [c,r]
k = ''.join(str(x)+' ' for x in dim) k = ''.join(str(x)+' ' for x in dim)
t.write(k+'\n') t.write(k+'\n')
print (k)
mat_tr = [] mat_tr = []
for j in range(0,c): for j in range(0,c):
row = function2(mat,j) row = function2(mat,j)
mat_tr.append(row) mat_tr.append(row)
s = ''.join(str(y)+' ' for y in row) s = ''.join(str(y)+' ' for y in row)
t.write(s+'\n') t.write(s+'\n')
\ No newline at end of file print (s)
\ No newline at end of file
4 3 5 5
1 5 2 1 6 11 16 21
2 6 5 2 7 12 17 22
3 7 6 3 8 13 18 23
4 8 8 4 9 14 19 24
5 10 15 20 25
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