          else:
              func = linkage_vector
  
          result_linkage = func(predictions, **kwargs)
          print(result_linkage.shape)
          exit(0)
          result_order = self.seriation(result_linkage,
                                        num_predictions,
                                        num_predictions + num_predictions - 2)
  
          return result_order
  
      @staticmethod
      def _get_clustering_method(item_count, dims):
          """ Calculate the RAM that will be required to sort these images and select the appropriate
 
</s> remove         else:
            func = linkage_vector
 </s> add  </s> remove         if clustering_method == "linkage":
 </s> add         if self._use_vector_linkage(num_predictions, dims):
            func = linkage_vector
        else: </s> remove             retval = "vector"
 </s> add             retval = True </s> remove         clustering_method = self._get_clustering_method(num_predictions, dims)

 </s> add  </s> remove         """ Sort a matrix of predictions by similarity Adapted from:
            https://gmarti.gitlab.io/ml/2017/09/07/how-to-sort-distance-matrix.html
        input:
            - predictions is a stacked matrix of vgg_face predictions shape: (x, 4096)
            - method = ["ward","single","average","complete"]
        output:
            - result_order is a list of indices with the order implied by the hierarhical tree

        sorted_similarity transforms a distance matrix into a sorted distance matrix according to
        the order implied by the hierarchical tree (dendrogram)
 </s> add         """ Sort a matrix of predictions by similarity.

        Transforms a distance matrix into a sorted distance matrix according to the order implied
        by the hierarchical tree (dendrogram).

        Parameters
        ----------
        predictions: numpy.ndarray
            A stacked matrix of vgg_face2 predictions of the shape (`N`, `D`) where `N` is the
            number of observations and `D` are the number of dimensions.  NB: The given
            :attr:`predictions` will be overwritten to save memory. If you still require the 
            original values you should take a copy prior to running this method
        method: ['single','centroid','median','ward']
            The clustering method to use.

        Returns
        -------
        list:
            List of indices with the order implied by the hierarchical tree
        result_order = self._seriation(result_linkage,
                                       num_predictions,
                                       num_predictions + num_predictions - 2)
          else:
              func = linkage_vector
  
          result_linkage = func(predictions, **kwargs)
        result_order = self._seriation(result_linkage,
                                       num_predictions,
                                       num_predictions + num_predictions - 2)
        result_order = self._seriation(result_linkage,
                                       num_predictions,
                                       num_predictions + num_predictions - 2)
        result_order = self._seriation(result_linkage,
                                       num_predictions,
                                       num_predictions + num_predictions - 2)
        result_order = self._seriation(result_linkage,
                                       num_predictions,
                                       num_predictions + num_predictions - 2)
        result_order = self._seriation(result_linkage,
                                       num_predictions,
                                       num_predictions + num_predictions - 2)
        result_order = self._seriation(result_linkage,
                                       num_predictions,
                                       num_predictions + num_predictions - 2)
          return result_order
  
      @staticmethod
      def _get_clustering_method(item_count, dims):
          """ Calculate the RAM that will be required to sort these images and select the appropriate
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 bugfix: tools.preview - Fix for new icons
bugfix: lib.vgg_face2_keras - Remove debug code
documentation: lib.vgg_face2_keras 
lib/vgg_face2_keras.py