數組我有這樣嘗試使用多填寫蟒蛇
x = 3;
y = 3;
z = 10;
ar = np.zeros((x,y,z))
from multiprocessing import Process, Pool
para = []
process = []
def local_func(section):
print "section %s" % str(section)
ar[2,2,section] = 255
print "value set %d", ar[2,2,section]
pool = Pool(1)
run_list = range(0,10)
list_of_results = pool.map(local_func, run_list)
print ar
在AR的價值不是用多線程改變了代碼,可能是什麼問題?
謝謝
達諾,我試過你的解決方案,它的工作原理。謝謝 – tanyonder 2014-09-19 18:51:49