_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › 覲豌襴
|
|
谿瑚: https://blog.dominodatalab.com/simple-parallelization/
from joblib import Parallel, delayed import multiprocessing # what are your inputs, and what operation do you want to # perform on each input. For example... L1 = [1,2,3,4] L2 = [5,6,7,8] def processInput(i, j): return i * i + j num_cores = multiprocessing.cpu_count() results = Parallel(n_jobs=num_cores)(delayed(processInput)(i,j) for i,j in tuple(zip(L1, L2)))
鏤
|
螳 谿襴讌 螻 ル碁ゼ 覈 . () |