Bootstrap function
def bootstrap(sample, resamples=10000): return[np.random.choice(sample, replace=True, size=len(sample)) for i in xrange(resamples)]