title: Why does this implementation of multiprocessing.pool not work?
body: <p>Here is the code I am using: </p>
  
  <pre><code>def initFunction(arg1, arg2):
      def funct(value):
          return arg1 * arg2 * value
      return funct
  
  os.system("taskset -p 0xff %d" % os.getpid()) 
  pool = Pool(processes=4)
  t = np.linspace(0,1,10e3)
  
  a,b,c,d,e,f,g,h = sy.symbols('a,b,c,d,e,f,g,h',commutative=False)
  
  arg1 = sy.Matrix([[a,b],[c,d]])
  arg2 = sy.Matrix([[e,f],[g,h]])
  myFunct = initFunction(arg1, arg2)
  
  m3 = map(myFunct,t) # this works
  m4 = pool.map(myFunct,t) # this does NOT work
  </code></pre>
  
  <p>The error I'm getting is:</p>
  
  <pre><code>Traceback (most recent call last):
     File "&lt;stdin&gt;", line 1, in &lt;module&gt;
     File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 540, in runfile
        execfile(filename, namespace)
     File "/home/justin/Research/mapTest.py", line 46, in &lt;module&gt;
        m4 = pool.map(myFunct,t) 
     File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
        return self.map_async(func, iterable, chunksize).get()
     File "/usr/lib/python2.7/multiprocessing/pool.py", line 558, in get
        raise self._value
  cPickle.PicklingError: Can't pickle &lt;type 'function'&gt;: attribute lookup __builtin__.function failed
  </code></pre>
  
  <p>So what does this error mean and how can I multiprocess this map function?</p>