#NEWLINE# def _calculate_linkage_scipy( self ) : #NEWLINE# #INDENT# if ( np . product ( self . shape ) >= 10000 ) : #NEWLINE# #INDENT# UserWarning ( 'This will be slow... (gentle suggestion: "pip install fastcluster")' ) #NEWLINE# #UNINDENT# pairwise_dists = distance . pdist ( linkage . array , metric = self . metric ) #NEWLINE# linkage = hierarchy . linkage ( pairwise_dists , method = self . method ) #NEWLINE# del pairwise_dists #NEWLINE# return linkage