Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- # 本当は10万くらいの長さ
- a = np.array([[1,2,3],[4,5,6],[7,8,9]])
- # こっちも10万くらいの長さ
- b = np.array([ [ [1,2,3],[4,5,6],[7,8,9] ], [ [1,2,3],[4,5,6],[7,8,9] ] ])
- res = []
- for i in range(a.shape[0]):
- for j in range(b.shape[0]):
- c = np.dot(a[i],b[j])
- res.append(c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement