Linear interpolation in two dimensions produces results outside of the data range
<p>I am using the <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp2d.html" rel="nofollow"><code>interp2d</code></a> method to produce liner spline functions. With certain point sets the resulting function is producing results that I would not expect. E.g.:</p>

<pre><code>from scipy import interpolate

x = [81, 81, 81, 83, 83, 83]
y = [ 9,  7,  5,  9,  7,  5]
z = [23.75374, 23.75416, 23.75376, 23.75621, 23.75581, 23.75686]
f = interpolate.interp2d(x, y, z, kind='linear')

print (str(f(82, 6)[0]))
print (str(f(82.5, 6.5)[0]))
print (str(f(81.5, 5.5)[0]))
</code></pre>

<p>Produces the following output:</p>

<pre><code>8.07860599193
0.240930002164
15.9162159912
</code></pre>

<p>I would try to play around with the stiffness parameter of this interpolation method, but apparently it is not available in <code>interp2d</code>.</p>

<p>What is causing these results? How can they be avoided?</p>