title: python: building an iterator over a grid from the grid nodes
body: <p>I am using python 3
  I would like to start from a list of nodes in 3 dimensions and build a grid. 
  I would like to avoid the construct</p>
  
  <pre><code>import numpy as np
  l = np.zeros(len(xv)*len(yv)*len(zv))
  for (i,x) in zip(range(len(xv)),xv):
     for (j,y) in zip(range(len(yv)),yv):
         for (k,z) in zip(range(len(zv)),zv):
             l[i,j,k] = func(x,y,z)
  </code></pre>
  
  <p>I am looking for a more compact version of the above lines. An iterator like <code>zip</code>, but that would iterate on all possible tuple in the grid</p>