{ } Raw JSON

bundles / scipy 1.17.1 / scipy / cluster / _hierarchy / calculate_cluster_sizes

cython_function_or_method

scipy.cluster._hierarchy:calculate_cluster_sizes

Signature

def   calculate_cluster_sizes ( Z cs n )

Summary

Calculate the size of each cluster. The result is the fourth column of the linkage matrix.

Parameters

Z : ndarray

The linkage matrix. The fourth column can be empty.

cs : ndarray

The array to store the sizes.

n : ndarray

The number of observations.

Aliases

  • scipy.cluster._hierarchy.calculate_cluster_sizes