code: def s_boot(Ss, ipar=0, nb=1000):
      
      #npts = len(Ss)
      Ss = np.array(Ss)
      npts = Ss.shape[0]
  # get average s for whole dataset
      nf, Sigma, avs = sbar(Ss)
      Tmean, Vmean = doseigs(avs)  # get eigenvectors of mean tensor
  #
  # now do bootstrap to collect Vs and taus of bootstrap means
  #
      Taus, Vs = [], []  # number of bootstraps, list of bootstrap taus and eigenvectors
  #
      for k in range(int(float(nb))):  # repeat nb times
          #        if k%50==0:print k,' out of ',nb
          # get a pseudosample - if ipar=1, do a parametric bootstrap
          BSs = apseudo(Ss, ipar, Sigma)
          nf, sigma, avbs = sbar(BSs)  # get bootstrap mean s
          tau, Vdirs = doseigs(avbs)  # get bootstrap eigenparameters
          Taus.append(tau)
          Vs.append(Vdirs)
      return Tmean, Vmean, Taus, Vs
docs: Returns bootstrap parameters for S data
  
      Parameters
      __________
      Ss : nested array of [[x11 x22 x33 x12 x23 x13],....] data
      ipar : if True, do a parametric bootstrap
      nb : number of bootstraps
  
      Returns
      ________
      Tmean : average eigenvalues
      Vmean : average eigvectors
      Taus : bootstrapped eigenvalues
      Vs :  bootstrapped eigenvectors