### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Spatial algorithms and data structures (`scipy.spatial`) »
- Distance computations (`scipy.spatial.distance`) »

# scipy.spatial.distance.mahalanobis

`scipy.spatial.distance.``mahalanobis`(u, v, VI)

  Computes the Mahalanobis distance between two 1-D arrays.

  The Mahalanobis distance between 1-D arrays u and v, is defined as

  where `V` is the covariance matrix. Note that the argument VI is the inverse of `V`.

  Parameters : | u : (N,) array_like Input array. v : (N,) array_like Input array. VI : ndarray The inverse of the covariance matrix.
  Returns : | mahalanobis : double The Mahalanobis distance between vectors u and v.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Spatial algorithms and data structures (`scipy.spatial`) »
- Distance computations (`scipy.spatial.distance`) »