### Navigation

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

# scipy.cluster.hierarchy.is_valid_linkage

`scipy.cluster.hierarchy.``is_valid_linkage`(Z, warning=False, throw=False, name=None)

  Checks the validity of a linkage matrix. A linkage matrix is valid if it is a two dimensional nd-array (type double) with rows and 4 columns. The first two columns must contain indices between 0 and . For a given row `i`, and (i.e. a cluster cannot join another cluster unless the cluster being joined has been generated.)

  Arguments : | warning : bool When `True`, issues a Python warning if the linkage matrix passed is invalid. throw : bool When `True`, throws a Python exception if the linkage matrix passed is invalid. name : string This string refers to the variable name of the invalid linkage matrix.
  Returns : | b : bool True iff the inconsistency matrix is valid.

### Navigation

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