title: python - different array length along interpolation axis?
body: <p>I am trying to use the Python interpolation function to get the value y for a given x but I am getting the error "raise ValueError("x and y arrays must be equal in length along along interpolation axis" even though my arrays have both equal size and shape (according to what I get when I use .shape in my code). I am quite new to programming so I don't know how to check what else could be different in my arrays. Here is my code:</p>
  
  <pre><code>s = []
  
  def slowroll(y, t):
  
      phi, dphi, a = y
      h = np.sqrt(1/3. * (1/2. * dphi**2 + 1/2.*phi**2))
      da = h*a
      ddphi = -3.*h*dphi - phi
  
      return [dphi,ddphi,da]
  
  
  phi_ini = 18.
  dphi_ini = -0.1
  init_y = [phi_ini,dphi_ini,1.]
  h_ini =np.sqrt(1/3. * (1/2. * dphi_ini**2. + 1/2.*phi_ini**2.))
  
  t=np.linspace(0.,20.,100.)
  
  from scipy.integrate import odeint
  
  sol = odeint(slowroll, init_y, t)
  
  phi = sol[:,0]
  dphi = sol[:,1]
  a=sol[:,2]
  n=np.log(a)
  h = np.sqrt(1/3. * (1/2. * dphi**2 + 1/2.*phi**2))
  
  s.extend(a*h)
  x = np.asarray(s)
  y = np.asarray(t)
  F = interp1d(y, x, kind='cubic') 
  
  print F(7.34858263)
  </code></pre>