¡@

Home 

python Programming Glossary: shared_arr

Use numpy array in shared memory for multiprocessing

http://stackoverflow.com/questions/7894791/use-numpy-array-in-shared-memory-for-multiprocessing

0 a 0 if __name__ '__main__' # Create the array N int 10 unshared_arr scipy.rand N a Array 'd' unshared_arr print Originally the first.. the array N int 10 unshared_arr scipy.rand N a Array 'd' unshared_arr print Originally the first two elements of arr s arr 2 # Create.. to @unutbu's and @Henry Gomersall's answers. You could use shared_arr.get_lock to synchronize access when needed shared_arr mp.Array..