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: ndarrayThe linkage matrix.
T: ndarrayThe flat clusters assignment returned by fcluster or fclusterdata.
L, M: ndarrayLandMstore the result (i.e., these inputs are modified in-place). The leader of flat clusterL[i]is nodeM[i].nc: intThe number of flat clusters.
n: intThe number of observations.
Returns
err_node: intFound that
Tis invalid when examining node err_node.-1indicates success.
Aliases
-
scipy.cluster._hierarchy.leaders