We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
N,M = map(int,input().split())
A =np.array([list(map(int,input().split()))for _ in range(N)])
B = np.array([list(map(int,input().split()))for _ in range(N)])
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 =np.array([list(map(int,input().split()))for _ in range(N)]) B = np.array([list(map(int,input().split()))for _ in range(N)])
print(np.add(A, B)) print(np.subtract(A, B)) print(np.multiply(A, B)) print(np.floor_divide(A, B)) print(np.mod(A, B)) print(np.power(A, B))