def _smooth_bootstrap(args, n_boot, func, func_kwargs):
 n = len(args[0])
 boot_dist = []
 kde = [stats.gaussian_kde(np.transpose(a)) for a in args]
 for i in range(int(n_boot)):
  sample = [a.resample(n).T for a in kde]
  boot_dist.append(func(*sample, **func_kwargs))
 return np.array(boot_dist)

def _smooth_bootstrap ( args , n_boot , func , func_kwargs ) : n = len ( args [ 0 ] ) boot_dist = [ ] kde = [ stats . gaussian_kde ( np . transpose ( a ) ) for a in args ] for i in range ( int ( n_boot ) ) : sample = [ a . resample ( n ) . T for a in kde ] boot_dist . append ( func ( * sample , ** func_kwargs ) ) return np . array ( boot_dist )
bootstrap by resampling from a kernel density estimate .