title: how to turn three 1D arrays into one 3D array by calculating the euclidian metric
body: <p>I have three arrays:</p>
  <pre><code>x_array = [1., 2., 3.]
  y_array = [1., 2., 3.]
  z_array = [1., 2., 3.]
  </code></pre>
  <p>These 3 arrays define the axis for a 3D array. I would like to calculate the Euclidian metric like</p>
  <pre><code>array3D = np.array((3, 3, 3))
  for ix in range(0, 3):
      for iy in range(0, 3):
          for iz in range(0, 3):
              dist = np.sqrt(x_array[ix]**2 + y_array[iy]**2 + z_array[iz]**2)
              array3D[ix][iy][iz] = dist
  </code></pre>
  <p>Is there a faster way than three <code>for</code> loops?</p>