def distfitbootstrap(sample, distr, nrepl=100):
 nobs = len(sample)
 res = np.zeros(nrepl)
 for ii in range(nrepl):
  rvsind = np.random.randint(nobs, size=nobs)
  x = sample[rvsind]
  res[ii] = distr.fit_fr(x, frozen=[np.nan, 0.0, 1.0])
 return res

def distfitbootstrap ( sample , distr , nrepl = 100 ) : nobs = len ( sample ) res = np . zeros ( nrepl ) for ii in range ( nrepl ) : rvsind = np . random . randint ( nobs , size = nobs ) x = sample [ rvsind ] res [ ii ] = distr . fit_fr ( x , frozen = [ np . nan , 0.0 , 1.0 ] ) return res
run bootstrap for estimation of distribution parameters hard coded: only one shape parameter is allowed and estimated .