### 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.canberra

`scipy.spatial.distance.``canberra`(u, v)

  Computes the Canberra distance between two 1-D arrays.

  The Canberra distance is defined as

  Parameters : | u : (N,) array_like Input array. v : (N,) array_like Input array.
  Returns : | canberra : double The Canberra distance between vectors u and v.

  Notes

  When u[i] and v[i] are 0 for given i, then the fraction 0/0 = 0 is used in the calculation.

### Navigation

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