So here is what I try to do,
N=1000
x=np.arange(0,1,1./float(len(N)))
XX,YY=np.meshgrid(x,x)
l=len(XX)
grid=np.array([ ([XX[i,i],YY[j,j],0. ]) for i in xrange(l) for j in xrange(l) ])
the numpy routine is rather fast but I need the grid to be in a different form and this takes quite long (I guess because of indexing the numpy array).
Thanks for any suggestions : )
Cheers