code: def fast_spearman(x, y=None, destination=None):
      
      logger.debug("x.shape:  {}".format(x.shape))
      if hasattr(y, "shape"):  
          logger.debug("y.shape:  {}".format(y.shape))
  
      x_ranks = pandas.DataFrame(x).rank(method="average").values
      logger.debug("some min and max ranks of x_ranks:\n{}\n{}".format(numpy.min(x_ranks[:10], axis=0), numpy.max(x_ranks[:10], axis=0)))
  
      y_ranks = pandas.DataFrame(y).rank(method="average").values if y is not None else None
  
      return fast_corr(x_ranks, y_ranks, destination)
docs: calculate the spearman correlation matrix for the columns of x (with dimensions MxN), or optionally, the spearman correlaton
      matrix between the columns of x and the columns of y (with dimensions OxP).  If destination is provided, put the results there.
      In the language of statistics the columns are the variables and the rows are the observations.
  
      Args:
          x (numpy array-like) MxN in shape
          y (optional, numpy array-like) OxP in shape.  M (# rows in x) must equal O (# rows in y)
          destination (numpy array-like) optional location where to store the results as they are calculated (e.g. a numpy
              memmap of a file)
  
          returns:
              (numpy array-like) array of the covariance values
                  for defaults (y=None), shape is NxN
                  if y is provied, shape is NxP