Commit
·
50fd4d2
1
Parent(s):
54dcd4b
Random seed bug removal
Browse files
app.py
CHANGED
|
@@ -14,7 +14,9 @@ def generate_random_walk(iters, step_size = 1, random_seed = None):
|
|
| 14 |
random_seed = random.randint(1, 100000)
|
| 15 |
else:
|
| 16 |
random_seed = random_seed
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
def distance_from_start(final_coord, start_coord, round_to=2):
|
| 19 |
return round(np.sqrt((final_coord[0] - start_coord[0])**2 + (final_coord[1] - start_coord[1])**2), round_to)
|
| 20 |
|
|
|
|
| 14 |
random_seed = random.randint(1, 100000)
|
| 15 |
else:
|
| 16 |
random_seed = random_seed
|
| 17 |
+
|
| 18 |
+
random.seed(random_seed)
|
| 19 |
+
|
| 20 |
def distance_from_start(final_coord, start_coord, round_to=2):
|
| 21 |
return round(np.sqrt((final_coord[0] - start_coord[0])**2 + (final_coord[1] - start_coord[1])**2), round_to)
|
| 22 |
|