We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 451461b + f35b43a commit 7739266Copy full SHA for 7739266
code/matrixmul.py
@@ -11,7 +11,7 @@
11
b.append([int(x) for x in raw_input("").split(" ")])
12
c = []
13
for i in range(0, n):
14
- c.append([a[i][j] * b[j][i] for j in range(0,n)])
+ c.append([sum([a[i][k] * b[k][j] for k in range(0,n)]) for j in range (0,n)])
15
print "After matrix multiplication"
16
print "-" * 10 * n
17
for x in c:
0 commit comments