Skip to content

[scipy.md] Update np.random → Generator API#547

Open
Chihiro2000GitHub wants to merge 1 commit intomainfrom
update-scipy-rng
Open

[scipy.md] Update np.random → Generator API#547
Chihiro2000GitHub wants to merge 1 commit intomainfrom
update-scipy-rng

Conversation

@Chihiro2000GitHub
Copy link
Copy Markdown
Collaborator

Summary

This PR updates lectures/scipy.md as part of the NumPy random API migration described in QuantEcon/meta#299.

The changes are limited to the following:

  • Replace np.random.beta(...) with rng = np.random.default_rng() / rng.beta(...)
  • Update the surrounding wording: "functions" → "tools" to avoid implying module-level functions
  • Replace np.random.randn(...) with rng.standard_normal(...) in "12.3.3. Other Goodies in scipy.stats"
  • Replace np.random.randn(...) with rng.standard_normal(...) in the Monte Carlo exercise solution (Exercise 12.3)

Each code block defines its own rng locally. The exercise solution block remains self-contained.
No fixed seed is introduced, as the original lecture did not use one.
No Numba-related code was present in this file.

Hi @mmcky and @HumphreyYang, I'd be grateful if you could take a look when you have time.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant