- Get link
- X
- Other Apps
First install numpy using the below command
import
numpy as np
# here we declare two matrices
mat1
=
([
1
,
2
,
3
],[
4
,
5
,
6
],[
7
,
8
,
9
])
mat2
=
([
9
,
8
,
7
],[
6
,
5
,
4
],[
3
,
2
,
1
])
# This will return multiplication
res
=
np.dot(mat1,mat2)
# print multiplication matrix
print
(res)
Output will be:
===============
Comments
Post a Comment