Message243269
OK, if it's not reproducible in a standalone script, I'll close this as it's expected behaviour.
Correcting the typo in your script (__name__ == "__main__"), I ran it and it worked as expected on my system:
>type multi.py
import multiprocessing
import numpy
def f(x):
return x*x
if __name__ == "__main__":
p= multiprocessing.Pool(5)
print(p.map(numpy.sqrt,[1,2,3,4]))
print(p.map(f,[1,2,3,4]))
PS 15:05 {00:00.089} C:\Work\Scratch
>py .\multi.py
[1.0, 1.4142135623730951, 1.7320508075688772, 2.0]
[1, 4, 9, 16]
I'm not sure why you weren't getting output, but it doesn't look like a Python issue. |
|
Date |
User |
Action |
Args |
2015-05-15 14:07:07 | paul.moore | set | recipients:
+ paul.moore, tim.golden, zach.ware, steve.dower, davin, abheeman |
2015-05-15 14:07:07 | paul.moore | set | messageid: <1431698827.53.0.662852939504.issue24202@psf.upfronthosting.co.za> |
2015-05-15 14:07:07 | paul.moore | link | issue24202 messages |
2015-05-15 14:07:07 | paul.moore | create | |
|