Skip to content

Commit d06b4e4

Browse files
authored
Create matrixmult.py
1 parent 4978266 commit d06b4e4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

python/matrixmult.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#Matrix multiplication using numpy.
2+
3+
import numpy as np
4+
5+
# input two matrices
6+
mat1 = ([1, 6, 5],[3 ,4, 8],[2, 12, 3])
7+
mat2 = ([3, 4, 6],[5, 6, 7],[6,56, 7])
8+
9+
# This will return matrix product of two array
10+
res = mat1 @ mat2
11+
12+
# print resulted matrix
13+
print(res)

0 commit comments

Comments
 (0)