title: ValueError: matrix must be 2-dimensional
body: <p>I have following codes to plot a gassian-2d contour,but I get this Error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "question.py", line 15, in &lt;module&gt;
      Z0=gaussian_2d(X0,Y0,2,3,cov)
    File "question.py", line 4, in gaussian_2d
      return exp(-0.5*mat([x-x0,y-y0])*sigmaMatrix.I*mat([x-x0,y-y0]).T)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/matrixlib/defmatrix.py", line 96, in asmatrix
      return matrix(data, dtype=dtype, copy=False)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/matrixlib/defmatrix.py", line 272, in __new__
      raise ValueError("matrix must be 2-dimensional")
  ValueError: matrix must be 2-dimensional
  </code></pre>
  
  <p>This my code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  from numpy import *
  def gaussian_2d(x, y, x0, y0, sigmaMatrix):
      return exp(-0.5*mat([x-x0,y-y0])*sigmaMatrix.I*mat([x-x0,y-y0]).T)
  cov=mat([[1,0],[0,2]])
  delta=0.025
  xgrid=arange(-2, 6, delta)
  ygrid=arange(-2, 6, delta)
  X0, Y0 = meshgrid(xgrid, ygrid)
  Z0=gaussian_2d(X0,Y0,2,3,cov)
  </code></pre>
  
  <p>Can anyone tell me what am i doing wrong here?</p>