You are viewing a single comment's thread. Return to all comments →
import numpy as np
n, m = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(n)]
B = [list(map(int, input().split())) for _ in range(n)]
a = np.array(A) b = np.array(B)
print(a + b) print(a - b) print(a * b) print(a // b) print(a % b) print(a ** b)
Seems like cookies are disabled on this browser, please enable them to open this website
Array Mathematics
You are viewing a single comment's thread. Return to all comments →
import numpy as np
n, m = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(n)]
B = [list(map(int, input().split())) for _ in range(n)]
a = np.array(A) b = np.array(B)
print(a + b) print(a - b) print(a * b) print(a // b) print(a % b) print(a ** b)