title: understanding inputs and outputs on scipy.ndimage.map_coordinates
body: <p>I am trying to map a straight line on a set of points in a grid. the data is in a list of x, y, z coordinates. I think map_coordinates is what i want, however i do not undestand the form of the inputs and outputs... any help would be much appreciated.</p>
  
  <pre><code>list = [[x1, y1, z1]
          [x2, y2, z2]
          ...
          [xn, yn, zn]]
  </code></pre>
  
  <p>the values I am trying to look up are x and y values.</p>
  
  <pre><code>look_up_values= [[x1, y1]
                   [x2, y2]
                   ...
                   [xn, yn]]
  </code></pre>
  
  <p>My question, why does map_coordinates expect a <code>(2,2)</code> array and what information is in the output ( a 2 value list). </p>
  
  <p>here is a workable example:</p>
  
  <pre><code>from scipy.ndimage.interpolation import map_coordinates
  import numpy as np
  in_data = np.array([[0.,0.,0.]
                      ,[0.,1.,.2]
                      ,[0.,2.,.4]
                      ,[1.,0.,.2]
                      ,[1.,3.,.5]
                      ,[2.,2.,.7]])
  z = map_coordinates(in_data, np.array([[1.,1.],[1.,2.]]), order=1)
  print z #I do not understand this output...
  #[1. .2]
  </code></pre>
  
  <p>if i had to guess i would say its interpolating between 2 points on the grid, buy what then would the output mean?</p>