{ } Raw JSON

bundles / scipy 1.17.1 / scipy / cluster / _hierarchy / leaders

cython_function_or_method

scipy.cluster._hierarchy:leaders

Signature

def   leaders ( Z T L M nc n )

Summary

Find the leader (root) of each flat cluster.

Parameters

Z : ndarray

The linkage matrix.

T : ndarray

The flat clusters assignment returned by fcluster or fclusterdata.

L, M : ndarray

L and M store the result (i.e., these inputs are modified in-place). The leader of flat cluster L[i] is node M[i].

nc : int

The number of flat clusters.

n : int

The number of observations.

Returns

err_node : int

Found that T is invalid when examining node err_node. -1 indicates success.

Aliases

  • scipy.cluster._hierarchy.leaders