code: def spearman_correlation(X, rowvar=False):
      
  
      Xrank = _compute_ranks(X)
      rank_correlation = np.corrcoef(Xrank, rowvar=rowvar)
  
      return 2 * np.sin(rank_correlation * np.pi / 6)
docs: Computes the spearman correlation estimate.
      This is effectively a bias corrected pearson correlation
      between rank transformed columns of X.
  
      Parameters
      ----------
      X: array-like, shape = [n_samples, n_features]
          Data matrix using which we compute the empirical
          correlation
  
      Returns
      -------
      rank_correlation
  
      References
      ----------
  
      Xue, Lingzhou; Zou, Hui.
      "Regularized rank-based estimation of high-dimensional
      nonparanormal graphical models."
      Ann. Statist. 40 (2012), no. 5, 2541--2571. doi:10.1214/12-AOS1041.
  
      Liu, Han, Fang; Yuan, Ming; Lafferty, John; Wasserman, Larry.
      "High-dimensional semiparametric Gaussian copula graphical models."
      Ann. Statist. 40.4 (2012): 2293-2326. doi:10.1214/12-AOS1037