Skip to content

[about_py.md] Update np.random → Generator API#548

Merged
HumphreyYang merged 1 commit into
mainfrom
update-rng-about-py
May 9, 2026
Merged

[about_py.md] Update np.random → Generator API#548
HumphreyYang merged 1 commit into
mainfrom
update-rng-about-py

Conversation

@Chihiro2000GitHub

Copy link
Copy Markdown
Collaborator

Summary

Migrate lectures/about_py.md to the NumPy Generator API as part of QuantEcon/meta#299.

  • Replace np.random.seed(1234) with rng = np.random.default_rng(1234) and update the two np.random.uniform calls to rng.uniform in the NetworkX graph example.
  • The fixed seed is preserved because the original lecture already used one.
  • No surrounding prose changes were required.
  • No Numba-related code is present in this file.

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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request May 9, 2026 04:33 Inactive
@Chihiro2000GitHub

Copy link
Copy Markdown
Collaborator Author

Hi @jstac, I just used GitHub CLI with Claude for this PR.

It was really nice — it made the workflow much faster, including the PR creation step.
Of course, I carefully reviewed the diff myself to make sure the change was appropriate.

Thank you for teaching me this!

@HumphreyYang

Copy link
Copy Markdown
Member

Many thanks @Chihiro2000GitHub, this looks great to me!

@HumphreyYang HumphreyYang merged commit 3213613 into main May 9, 2026
5 checks passed
@HumphreyYang HumphreyYang deleted the update-rng-about-py branch May 9, 2026 05:36
@mmcky

mmcky commented May 9, 2026

Copy link
Copy Markdown
Contributor

✅ Translation sync completed (zh-cn)

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

  • lectures/about_py.md

@mmcky

mmcky commented May 9, 2026

Copy link
Copy Markdown
Contributor

✅ Translation sync completed (fa)

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

  • lectures/about_py.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