🌐 [translation-sync] [theil_2.md] Update np.random → Generator API - #216
🌐 [translation-sync] [theil_2.md] Update np.random → Generator API#216mmcky 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: 该修改部分(“有稳健性:预防性储蓄”)翻译质量很高,准确传达了原文关于稳健性下预防性储蓄机制的技术内容,术语使用与术语表一致,数学公式和代码块格式完整无误,仅有个别措辞可进一步打磨但不影响理解。 “有稳健性:预防性储蓄”部分的专业术语(如“确定性等价”“最坏情形”“预防性储蓄”)翻译准确且与术语表一致 数学公式与代码块完整保留,交叉引用标签未被破坏 长句的拆分和逻辑关系(如“只有期望算子改变”)清晰自然,符合中文学术表达习惯 Suggestions:
🔍 Diff Quality
Summary: The target document correctly mirrors the source's RNG modernization (np.random.seed/randn to default_rng/standard_normal) and blank-line removals before headings, with no unnecessary changes. This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Pull request overview
This PR syncs the zh-cn translation of theil_2.md with the upstream source update that modernizes NumPy randomness usage, moving from legacy global np.random state to the Generator API for reproducible simulation.
Changes:
- Replaced
np.random.seed(...)/np.random.randn(...)withrng = np.random.default_rng(...)/rng.standard_normal(...)in the simulation cell. - Removed several whitespace-only blank lines in the markdown for cleaner formatting.
- Updated translation sync state metadata (
source-sha, sync date, 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/theil_2.md | Updates the stochastic simulation example to use NumPy’s Generator API and cleans up stray whitespace-only lines. |
| .translate/state/theil_2.md.yml | Refreshes translation-sync metadata to reflect the new upstream source commit and tooling. |
💡 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
#1005 - [theil_2.md] Update np.random → Generator API
Files Updated
lectures/theil_2.md.translate/state/theil_2.md.ymlDetails
This PR was created automatically by the translation action.