You are viewing a single comment's thread. Return to all comments →
import numpy as np if __name__ == '__main__': n = int(input().rstrip()) array1 = np.array([[int(x) for x in input().rstrip().split()] for i in range(n)]) array2 = np.array([[int(x) for x in input().rstrip().split()] for i in range(n)]) array2_transpose = np.array([[array2[i, j] for i in range(n)] for j in range(n)]) matrix_dot = np.array([[np.dot(array1[i], array2_transpose[j]) for j in range(n)] for i in range(n)]) print(matrix_dot)
Seems like cookies are disabled on this browser, please enable them to open this website
Dot and Cross
You are viewing a single comment's thread. Return to all comments →