We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9a8d7f commit a684355Copy full SHA for a684355
examples/benchmarks/monte_carlo_pi.py
@@ -38,7 +38,7 @@ def calc_pi_numpy(samples):
38
np.random.seed(1)
39
x = np.random.rand(samples).astype(np.float32)
40
y = np.random.rand(samples).astype(np.float32)
41
- return 4 * np.sum(in_circle(x, y)) / samples
+ return 4. * np.sum(in_circle(x, y)) / samples
42
43
def calc_pi_host(samples):
44
count = sum(1 for k in frange(samples) if in_circle(random(), random()))
0 commit comments