Advertisement
brospresident

Untitled

Oct 6th, 2021
1,235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. import numpy as np
  2.  
  3. def produsMatrice(a: np.ndarray, b: np.ndarray) -> any:
  4.     produs = [
  5.         [0, 0, 0],
  6.         [0, 0, 0],
  7.         [0, 0, 0]
  8.     ]
  9.     for i in range(len(a)):
  10.         for j in range(len(b[0])):
  11.             for q in range(len(b)):
  12.                 produs[i][j] += a[i][q] * b[q][j]
  13.  
  14.     for elem in produs:
  15.         print(elem)
  16.  
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement