🌐 [translation-sync] [os_stochastic.md] Update np.random → Generator API - #224
🌐 [translation-sync] [os_stochastic.md] Update np.random → Generator API#224mmcky 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 modified sections (The Bellman Operator and Model) are translated accurately, fluently, and consistently with the provided glossary. Technical terms, code comments, and math are well preserved with correct MyST formatting and full-width punctuation. Only very minor stylistic nits were found; no accuracy or syntax errors are present in the changed sections. Accurate and consistent rendering of key dynamic programming terms such as '贝尔曼算子' and '逐期最优' across the modified sections Mathematical notation and code blocks are preserved intact with no corruption Natural academic register maintained in Chinese, matching the tone of the English source Suggestions:
🔍 Diff Quality
Summary: The RNG modernization code change was correctly synced into the target document at the matching location within the create_model function under the Model/Computation section, with translation metadata correctly left unchanged since no headings were altered. This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Pull request overview
This translation-sync PR updates the Chinese os_stochastic.md lecture to align with upstream changes that migrate NumPy’s legacy np.random usage to the newer Generator API, while also cleaning up extraneous whitespace in the markdown.
Changes:
- Replace
np.random.seed/np.random.randnwithnp.random.default_rng(seed)+rng.standard_normal(...)in the model setup code cell. - Remove whitespace-only blank lines between sections to normalize markdown formatting.
- Update translation state metadata to the new upstream
source-sha, sync date, mode, and tool version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lectures/os_stochastic.md | Updates the lecture’s random number generation example to the NumPy Generator API and tidies whitespace-only blank lines. |
| .translate/state/os_stochastic.md.yml | Updates translation-sync state metadata (source SHA, synced date, mode, tool version). |
💡 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
#997 - [os_stochastic.md] Update np.random → Generator API
Files Updated
lectures/os_stochastic.md.translate/state/os_stochastic.md.ymlDetails
This PR was created automatically by the translation action.