Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- def produsMatrice(a: np.ndarray, b: np.ndarray) -> any:
- produs = [
- [0, 0, 0],
- [0, 0, 0],
- [0, 0, 0]
- ]
- for i in range(len(a)):
- for j in range(len(b[0])):
- for q in range(len(b)):
- produs[i][j] += a[i][q] * b[q][j]
- for elem in produs:
- print(elem)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement