You are viewing a single comment's thread. Return to all comments →
Using numpy funtion for the operations is faster or just using the mathematical operations?
import numpy as np N, M = map(int, input().split()) A = np.array([list(map(int, input().split())) for _ in range(N)], int) B = np.array([list(map(int, input().split())) for _ in range(N)], int) print(np.add(A,B), np.subtract(A,B), np.multiply(A,B,), np.floor_divide(A,B), np.mod(A,B), np.power(A,B), sep = "\n")
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 →
Using numpy funtion for the operations is faster or just using the mathematical operations?