### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Clustering package (`scipy.cluster`) »
- Hierarchical clustering (`scipy.cluster.hierarchy`) »

# scipy.cluster.hierarchy.correspond

`scipy.cluster.hierarchy.``correspond`(Z, Y)

  Checks for correspondence between linkage and condensed distance matrices

  They must have the same number of original observations for the check to succeed.

  This function is useful as a sanity check in algorithms that make extensive use of linkage and distance matrices that must correspond to the same set of original observations.

  Parameters : | Z : array_like The linkage matrix to check for correspondence. Y : array_like The condensed distance matrix to check for correspondence.
  Returns : | b : bool A boolean indicating whether the linkage matrix and distance matrix could possibly correspond to one another.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Clustering package (`scipy.cluster`) »
- Hierarchical clustering (`scipy.cluster.hierarchy`) »