Skip to content

[solow.md] Update np.random → Generator API#739

Open
Chihiro2000GitHub wants to merge 1 commit into
mainfrom
update-rng-solow
Open

[solow.md] Update np.random → Generator API#739
Chihiro2000GitHub wants to merge 1 commit into
mainfrom
update-rng-solow

Conversation

@Chihiro2000GitHub
Copy link
Copy Markdown
Contributor

Summary

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

  • Replaced np.random.randn() with rng.standard_normal() in the lognorm() function inside the solow_ex2 solution block.
  • Added rng = np.random.default_rng() to the constants block at the start of the solution, keeping the solution block self-contained.
  • No fixed seed introduced.
  • No Numba-related code in this file.

Details

rng = np.random.default_rng() was placed in the block headed by the comment # Define the constants. Strictly speaking, rng is not a model constant. If you feel the wording or placement should be adjusted (e.g. a blank line before rng =, or a separate comment), I would be happy to hear your thoughts.

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>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 8811bc3
🔍 Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/6a0ab32d200f320008c51f0f
😎 Deploy Preview https://deploy-preview-739--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

@github-actions github-actions Bot temporarily deployed to pull request May 18, 2026 06:42 Inactive
@github-actions github-actions Bot temporarily deployed to pull request May 18, 2026 06:43 Inactive
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.

2 participants