You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[numba.md] numba_ex3 asks for n = 100_000_000 but the shared setup and solution use n = 1_000_000 #579
Since #550, the Exercises section opens with a shared setup block that draws u_draws and v_draws at n = 1_000_000 so the samples can be reused by both {ref}speed_ex1 and {ref}numba_ex3.
The statement of numba_ex3 still ends with: "For the size of the Monte Carlo simulation, use something substantial, such as n = 100_000_000." The provided solution then uses the shared 10^6 arrays, so it appears to ignore the exercise's own instruction — and at 10^6 the parallel gain over the serial version is modest, which undercuts the point the exercise is making.
Two possible fixes:
Soften or drop the n = 100_000_000 sentence in numba_ex3 and point readers at numba_ex_draw_speed, which already does the large-n comparison end-to-end.
Keep the sentence and add a line to the solution noting that the shared n keeps runtime and memory low, and that scaling up means regenerating the arrays (memory grows at roughly 16n bytes, about 1.6 GB at 10^8).
Origin: flagged by Copilot review on the zh-cn sync PR QuantEcon/lecture-python-programming.zh-cn#70. The translated text mirrors the English source verbatim, so the fix belongs here and will propagate to all editions through translation sync.
Activity