title: fitting a linear surface with numpy least squares
body: <p>So I want to solve the equation <code>z= a + b*y +c*x</code>,. getting <code>a,b,c</code>.
   ie: making a (plane) surface fit to a load of scatter points in 3D space.</p>
  
  <p>But I can't seem to find anything! I thought there would be a simple module for such a simple problem. </p>
  
  <p>I have tried, where x,y,z are arrays;</p>
  
  <pre><code>ys=zip(x,y)
  (coeffs, residuals, rank, sing_vals) = np.linalg.lstsq(ys,z)
  </code></pre>
  
  <p>am I right in thinking coeffs = b,c?
  Or am I going completely in the wrong direction. I just can't seem to find anything else that will work in 3d...</p>