import time
a = np.random.rand(1000000)
b = np.random.rand(1000000)
tic = time.time()
c = np.dot(a, b)
toc
python- numpy dot相乘与for loop 的时间优化
最新推荐文章于 2022-10-27 22:20:15 发布
import time
a = np.random.rand(1000000)
b = np.random.rand(1000000)
tic = time.time()
c = np.dot(a, b)
toc