title: Unable to calculate mahalanobis distance
body: <pre><code>import numpy as np
  from scipy.spatial import distance
  
  d1 = np.random.randint(0, 255, size=(50))*0.9
  d2 = np.random.randint(0, 255, size=(50))*0.7
  
  vi = np.linalg.inv(np.cov(d1,d2, rowvar=0))   
  res = distance.mahalanobis(d1,d2,vi)
  
  print res
  </code></pre>
  
  <p>ValueError: shapes (50,) and (2,2) not aligned: 50 (dim 0) != 2 (dim 0)</p>