I am using the following test code:
from pathos.multiprocessing import ProcessingPool as Pool
import numpydef foo(obj1, obj2):a = obj1**2b = numpy.asarray(range(1,5))return obj1, bif __name__ == '__main__':p = Pool(5)res = p.map(foo, [1,2,3], [4,5,6])
It gives error:
File "C:\Python27\lib\site-packages\multiprocess\pool.py", line 567, in getraise self._value
NameError: global name 'numpy' is not defined
What am I doing wrong in the code?
Edit: Why was this question voted down twice?
I have numpy installed and my interpreter has been using it correctly until I try to do it for multiprocessing. I have been coding with same install for a while.