title: Scipy multidimensional kernel density estimate
body: <p>I've been trying to get a kernal density estimate for a 30x30 array. A short example is below,</p>
  
  <pre><code>from scipy.stats import gaussian_kde
  
  x = arange(-0.5,0.51,1/29.)
  y = arange(-0.5,0.51,1/29.)
  z = randn(30,30)
  
  vec = vstack((x,y))
  
  KDE = gaussian_kde(z.T)
  KDE2 = KDE(vec)
  </code></pre>
  
  <p>this gives the following error,</p>
  
  <pre><code>ValueError: points have dimension 2, dataset has dimension 30
  </code></pre>
  
  <p>I've found some other posts here which suggest the data needs to be reshaped before the estimate but I am unsure how to do this correctly.</p>
  
  <p>Any help appreciated
  D</p>