title: Python - Multi processing to mount an array
body: <p>I m using griddata to "mount" array with a great number of shapes and
  i would like to know if i can calculate functions (on each slice) on each my 4 cores in order to accelerate the process?</p>
  
  <pre><code>import numpy
  
  size = 8.
  Y=(arange(2000))
  X=(arange(2000))
  (xx,yy)=meshgrid(X,Y)
  
  array=zeros((Y.shape[0],X.shape[0],size))
  
  array[:,:,0] = 0
  array[:,:,1] = X+Y
  array[:,:,2] = X**2+Y**2+X+Y
  array[:,:,3] = X**3+Y**3+X**2+Y**2+X+Y
  
  array[:,:,4] = X**4+Y**4+X**3+Y**3+X**2+Y**2+X+Y
  array[:,:,5] = X**5+Y**5+X**4+Y**4+X**3+Y**3+X**2+Y**2+X+Y
  array[:,:,6] = X**6+Y**6+X**5+Y**5+X**4+Y**4+X**3+Y**3+X**2+Y**2+X+Y
  array[:,:,6] = X**7+Y**7+X**6+Y**6+X**5+Y**5+X**4+Y**4+X**3+Y**3+X**2+Y**2+X+Y
  </code></pre>
  
  <p>So here i would like to calculate array[:,:,0] &amp; array[:,:,1] with the first core, then array[:,:,2] &amp; array[:,:,3] with the second core...?</p>
  
  <p>----EDIT LATER---</p>
  
  <p>There is no link between different "slices"...My different functions are independent</p>
  
  <pre><code>array[:,:,0] = 0
  array[:,:,1] = X+Y
  array[:,:,2] = X*np.cos(X)+Y*np.sin(Y)
  array[:,:,3] = X**3+np.sin(X)+X**2+Y**2+np.sin(Y)
  ...
  </code></pre>