title: TypeError: iteration over a 0-d array Python
body: <p>I am trying to write a very basic nearest neighbor calculation. I basically want to see what t looks like but I got this type error. When I asked the funciton to return just t it said "". When I asked it to turn to list it threw "TypeError: iteration over a 0-d array Python "</p>
  
  <p>How do I fix this please?</p>
  
  <pre><code>...
  
  t = np.array(map(lambda v:
               map(lambda w: distance(v, w, L), x_train.values),
               x_test.values)) 
  
  ...
  </code></pre>
  
  <p>Full trace:
  <a href="https://i.stack.imgur.com/2RiUA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2RiUA.png" alt="enter image description here"></a></p>