def sample(n): return (rand(n) ** 2 + rand(n) ** 2 <= 1).sum() n = 1000000. 4 * sample(n) / n from IPython.parallel import Client rc = Client() v = rc[:] with v.sync_imports(): from numpy.random import rand 4 * sum(v.map_sync(sample, [n] * len(v))) / (n * len(v))