🌐 [translation-sync] [os_egm.md] Update np.random → Generator API - #223
🌐 [translation-sync] [os_egm.md] Update np.random → Generator API#223mmcky wants to merge 2 commits into
Conversation
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-5 | Date: 2026-07-31 📝 Translation Quality
Summary: The translation of the Implementation section (and surrounding modified content) is accurate, fluent, and terminologically consistent with the glossary. Code blocks and math are fully preserved, and no syntax errors were found. Only very minor stylistic nits were identified regarding phrasing of code comments. Technical terminology (Coleman-Reffett 算子, 内生网格, 边际效用, 科布-道格拉斯 etc.) is translated accurately and consistently with the glossary Code comments within the Implementation section are all properly translated while code itself remains untouched, preserving functionality Mathematical notation and equation labels are fully preserved with correct LaTeX/MyST syntax Sentence structure in the Implementation section reads fluently and maintains appropriate academic register Suggestions:
🔍 Diff Quality
Summary: The core code translation (random seed API update) was correctly applied, but two extraneous blank-line deletions were introduced that don't match the source diff. Issues:
This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Pull request overview
This automated translation-sync PR updates the os_egm lecture’s random number generation to use NumPy’s modern Generator API (moving away from the legacy global np.random state), keeping the Chinese translation aligned with the upstream source lecture.
Changes:
- Replaced
np.random.seed+np.random.randnwith a localrng = np.random.default_rng(seed)+rng.standard_normal(...)in the lecture code cell. - Removed a couple of whitespace-only lines in the markdown.
- Updated translation-sync state metadata (
source-sha,synced-at, model, tool-version, mode).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lectures/os_egm.md | Switches RNG usage in the lecture example to Generator and applies minor markdown whitespace cleanup. |
| .translate/state/os_egm.md.yml | Updates translation-sync tracking metadata to reflect the new upstream source and sync run. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python.myst.
Source PR
#996 - [os_egm.md] Update np.random → Generator API
Files Updated
lectures/os_egm.md.translate/state/os_egm.md.ymlDetails
This PR was created automatically by the translation action.