### Navigation

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

# scipy.cluster.hierarchy.leaves_list

`scipy.cluster.hierarchy.``leaves_list`(Z)

  Returns a list of leaf node ids (corresponding to observation vector index) as they appear in the tree from left to right. Z is a linkage matrix.

  Arguments : | Z : ndarray The hierarchical clustering encoded as a matrix. See `linkage` for more information.
  Returns : | L : ndarray The list of leaf node ids.

### Navigation

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