im_data_base = multiprocessing.Array(ctypes.c_float, im_size[0] * im_size[1])
im_data = np.ctypeslib.as_array(im_data_base.get_obj())
im_data = im_data.reshape(im_size[0], im_size[1])
Python multiprocessing and shared variable