import numpy as np import multiprocessing as mp a = np.array([[-1, 2, 3], [0, 2, 4], [1, 7, 2]])
pool = mp.Pool(processes=2) res = [pool.apply_async(sum, (a[:, i],)) for i in range(a.shape[1])] pool.close() pool.join() print(res[0].get())