Skip to content

[eig_circulant.md] Update np.random → Generator API - #994

Merged
kp992 merged 1 commit into
mainfrom
update-rng-eig-circulant
Jul 31, 2026
Merged

[eig_circulant.md] Update np.random → Generator API#994
kp992 merged 1 commit into
mainfrom
update-rng-eig-circulant

Conversation

@Chihiro2000GitHub

Copy link
Copy Markdown
Contributor

Summary

This PR migrates legacy NumPy random API usage in eig_circulant.md as part of QuantEcon/meta#299.

The single np.random.random(...) draw is replaced with an explicit rng = np.random.default_rng().

Related PRs and issues

I checked for open PRs and issues related to this lecture. No open PR touches it, and the only related issue (#512) is a title-formatting tracking issue unrelated to this migration.

Details

  • np.random.random(8)rng.random(8), with rng = np.random.default_rng() defined at the point of use in the main text.
  • No fixed seed is introduced, since the lecture did not seed before.
  • The lecture contains no Numba/@jit code, so there are no parallel-RNG concerns.

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

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rs2tDEcDXLnfMnM88v8e1D
@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-994--sunny-cactus-210e3e.netlify.app

Commit: 604ed6d

📚 Changed Lectures


Build Info

@kp992
kp992 merged commit 113d0e2 into main Jul 31, 2026
1 check passed
@kp992
kp992 deleted the update-rng-eig-circulant branch July 31, 2026 23:21
@mmcky

mmcky commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

✅ Translation sync completed (zh-cn)

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

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