This question following this one [1]. I have a big 3D array and i have to do some heavy calculations on it. I would like to split a slice of my array in 4 parts and do calculations for each part with each 4 cores of my computer... And do that for each slices of my 3D array...what is the best way to do that?
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*cos(X)+Y*sin(Y)
array[:,:,3] = X**3+sin(X)+X**2+Y**2+sin(Y)