Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Multiplicação de matrizes com numpy:
- import numpy as np
- m1 = np.matrix('1 1; 0 1')
- m2 = np.matrix('2 0; 3 4')
- #elementwise product
- m1 * m2
- #Construção da matriz com arrays:
- m1 = np.array( [[1,1], [0,1]] )
- m2 = np.array( [[2,0], [3,4]] )
- #matrix product
- np.dot(m1, m2)
- np.matmul(m1, m2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement