Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

# Copyright (C) 2014 ETH Zurich, Institute for Astronomy 

 

''' 

Created on Jul 23, 2014 

 

author: jakeret 

''' 

from __future__ import print_function, division, absolute_import, unicode_literals 

from IPython import parallel 

 

class IPythonPoolWrapper(object): 

""" 

Wraps the IPython balanced view to interface the Pool.map 

""" 

 

def __init__(self): 

client = parallel.Client() 

self.view = client.load_balanced_view() 

 

def map(self, func, sequence): 

return self.view.map_sync(func, sequence) 

 

def close(self): 

self.view.close()