1
from IPython.parallel import Client
4
v = rc.load_balanced_view()
6
result = v.map(lambda x: 2*x, range(10))
7
print "Simple, default map: ", list(result)
9
ar = v.map_async(lambda x: 2*x, range(10))
10
print "Submitted tasks, got ids: ", ar.msg_ids
12
print "Using a mapper: ", result
14
@v.parallel(block=True)
17
result = f.map(range(10))
18
print "Using a parallel function: ", result
b'\\ No newline at end of file'