SciPy

scipy.cluster.hierarchy.is_isomorphic

scipy.cluster.hierarchy.is_isomorphic(T1, T2)[source]

Determine if two different cluster assignments are equivalent.

Parameters:
T1 : array_like

An assignment of singleton cluster ids to flat cluster ids.

T2 : array_like

An assignment of singleton cluster ids to flat cluster ids.

Returns:
b : bool

Whether the flat cluster assignments T1 and T2 are equivalent.