_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
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)))
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2019-02-18 09:06:57

讌 瑚 覿螻狩. 蠏碁朱 企蟾讌 瑚企. 覈 蟆 . 蠏碁朱 企 蟆 . 蠏碁Μ螻 覈 蟆 り 伎 願 企 蟆蟾讌 蠍壱讌 蟆企. ( 覯 伎)