Skip to content

[python_essentials.md] Update np.random → Generator API#544

Merged
HumphreyYang merged 1 commit intomainfrom
update-python-essentials-rng
May 2, 2026
Merged

[python_essentials.md] Update np.random → Generator API#544
HumphreyYang merged 1 commit intomainfrom
update-python-essentials-rng

Conversation

@Chihiro2000GitHub
Copy link
Copy Markdown
Collaborator

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

Changes made:

  • Replaced np.random.randn() with rng.standard_normal().
  • Added rng = np.random.default_rng() in both the exercise block and the corresponding solution block.

The changes are small and straightforward.
When you have time, I would be grateful if you could take a look.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Member

@HumphreyYang HumphreyYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Chihiro2000GitHub, looks great to me!

@HumphreyYang HumphreyYang merged commit c571121 into main May 2, 2026
5 checks passed
@HumphreyYang HumphreyYang deleted the update-python-essentials-rng branch May 2, 2026 03:07
@mmcky
Copy link
Copy Markdown
Contributor

mmcky commented May 2, 2026

✅ Translation sync completed (zh-cn)

Target repo: QuantEcon/lecture-python-programming.zh-cn
Translation PR: QuantEcon/lecture-python-programming.zh-cn#60
Files synced (1):

  • lectures/python_essentials.md

@mmcky
Copy link
Copy Markdown
Contributor

mmcky commented May 2, 2026

✅ Translation sync completed (fa)

Target repo: QuantEcon/lecture-python-programming.fa
Translation PR: QuantEcon/lecture-python-programming.fa#117
Files synced (1):

  • lectures/python_essentials.md

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.

3 participants