scipy.cluster.hierarchy.fcluster(Z, t, criterion='inconsistent',
depth=2, R=None, monocrit=None)  Forms flat clusters from the
hierarchical clustering defined by the linkage matrix Z.
Parameters :  Z : ndarray  The hierarchical clustering encoded
with the matrix returned by the linkage function.  t : float
The threshold to apply when forming flat clusters.  criterion :
str, optional  The criterion to use in forming flat clusters.
This can be any of the following values:   If a cluster node and
all its descendants have an inconsistent value less than or
equal to t then all its leaf descendants belong to the same flat
cluster. When no non-singleton cluster meets this criterion,
every node is assigned to its own cluster. (Default)   Forms
flat clusters so that the original observations in each flat
cluster have no greater a cophenetic distance than t.   Finds a
minimum threshold r so that the cophenetic distance between any
two original observations in the same flat cluster is no more
than r and no more than t