title: Does scipy.interpolate.interp1d have problems with decimal values leading the x values?
body: <p>I'm trying to use <em>interp1d()</em> from scipy to interpolate some data, but I keep hitting an out or range error. After hours of Googling, I now know that x values not in increasing order will cause the same error I'm getting but I've already made sure that's not the problem. As far as I can tell, it looks like <em>interp1d()</em> doesn't like decimals in the first value. Am I missing something?</p>
  
  <p><strong>A simplified version of my problem:</strong></p>
  
  <p>The following runs just fine.</p>
  
  <pre><code>import numpy as np
  from scipy.interpolate import interp1d
  
  interp1d(np.array([1, 2, 3, 4, 5, 6]),
           np.array([2, 4, 6, 8, 10, 12]), kind='cubic')(np.linspace(1, 6, num=40))
  </code></pre>
  
  <p>But, this:</p>
  
  <pre><code>interp1d(np.array([1.1, 2.2, 3.3, 4.4, 5.5, 6.6]),
       np.array([2, 4, 6, 8, 10, 12]), kind='cubic')(np.linspace(1, 6, num=40))
  </code></pre>
  
  <p>Returns:</p>
  
  <blockquote>
    <p>ValueError: A value in x_new is below the interpolation range.</p>
  </blockquote>
  
  <p>But, this works just fine.</p>
  
  <pre><code>interp1d(np.array([1.0, 2.2, 3.3, 4.4, 5.5, 6.6]),
           np.array([2, 4, 6, 8, 10, 12]), kind='cubic')(np.linspace(1, 6, num=40))
  </code></pre>