Dot and Cross

  • + 0 comments

    import numpy as np a = int(input()) element = [] element1= [] for z in range(a): b= input() c= b.split() element.append(c)

    for j in range(a): b= input() c= b.split() element1.append(c) element = np.array(element, dtype=int) element1 = np.array(element1, dtype=int) print(np.dot(element,element1))