Skip to content

Instantly share code, notes, and snippets.

@otaviomguerra
Created July 29, 2018 01:58
Show Gist options
  • Save otaviomguerra/949e6de36b1f2c45d1708de145641dec to your computer and use it in GitHub Desktop.
Save otaviomguerra/949e6de36b1f2c45d1708de145641dec to your computer and use it in GitHub Desktop.
Perform various bootstrap replications using bootstrap_replicates.py function
def draw_bs_reps(data, func, size=1):
"""Draw bootstrap replicates."""
# Initialize array of replicates: bs_replicates
bs_replicates = np.empty(size)
# Generate replicates
for i in range(size):
bs_replicates[i] = bootstrap_replicate_1d(data, func)
return bs_replicates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment