Skip to content

Commit

Permalink
remove function estimate of pi
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew T West committed Sep 1, 2022
1 parent de4fdc0 commit 7e10af4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pi_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ def sample_square(seed, iters):
samples['cumm_success'] = samples.in_circle.cumsum()
samples['est_area'] = 4*samples.cumm_success/np.arange(1,iters+1)

# Estimate PI using stochastic integration of (1-x^2)
Z_x = (1-samples.x**2)**0.5
samples['est_func'] = 4*Z_x.cumsum()/np.arange(1,iters+1)

return samples

if __name__ == "__main__":
Expand Down

0 comments on commit 7e10af4

Please sign in to comment.