Skip to content

Commit a085743

Browse files
authored
Fixes unused iteration argument
The function `random_walk_fastest` does not use the supplied argument but rather the hardcoded 1000 iterations.
1 parent 9d92bc6 commit a085743

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

02-introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ super simple. We just have to translate itertools call into numpy ones.
109109
.. code:: python
110110
111111
def random_walk_fastest(n=1000):
112-
steps = 2*np.random.randint(0, 2, size=1000) - 1
112+
steps = 2*np.random.randint(0, 2, size=n) - 1
113113
return np.cumsum(steps)
114114
115115
walk = random_walk_fastest(1000)

0 commit comments

Comments
 (0)