Created
October 12, 2017 03:51
-
-
Save jakkaj/61ea9a770f9f7c7772c6ddd162bb8ac9 to your computer and use it in GitHub Desktop.
Multiply two matrices in Python (matrix transform)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
Y = [[0,1,2], | |
[3 ,4,5], | |
[6 ,7,8]] | |
X = [[0,-2,2], | |
[5,1,5], | |
[1,4,-1]] | |
matX = np.matrix(X) | |
matY = np.matrix(Y) | |
result = matX * matY | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment