title: Numpy : ValueError: object of too small depth for desired array
body: <p>I am trying to convert a MATLAB code to Python where I am stuck of how to import this line to Python:</p>
  
  <pre><code>YDFA_xa_p = interp1(data(:,1),data(:,2),YDFA_lam_p*1e9,'linear')*1e-24;
  </code></pre>
  
  <p>Now for Python I have changed it as:</p>
  
  <pre><code>YDFA_xa_p = numpy.interp(data[:, 1], data[:, 2], YDFA_lam_p * 1e9) * 1e-24
  
  data[:,1] and data[:,2] and YDFA_lam_p values are:
  
  [ 2.  2.  2.  2.  2.  2.  2.  2.  2.  2.] [ 3.  3.  3.  3.  3.  3.  3.  3.  3.  3.] 915.0
  </code></pre>
  
  <p>The issue I see is that the variable YDFA_lam_p is a float variable while it is expecting an array of float of 10 elements?</p>
  
  <p>If I am correct in my understanding how can I correct it ? I tried ways I find in google but it just isn't working. </p>