🌐 [translation-sync] [ar1_processes.md] Update np.random → Generator API - #282
Conversation
✅ Deploy Preview for playful-platypus-17d3bb ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-03 📝 Translation Quality
Summary: 练习部分的翻译总体质量较高,数学内容和代码块保持完整准确,术语使用基本遵循术语表要求。存在的问题主要是次要的:分段函数中夹杂纯中文文字未使用 \text{} 包裹可能影响公式渲染的一致性;部分外部链接使用百度百科而非维基百科来源不统一;个别措辞可以更加自然流畅。整体不影响读者理解,属于可优化的细节问题。 练习部分的数学公式、代码块与原文结构保持高度一致,MyST 指令(exercise/solution)格式正确无误 术语翻译(如“核密度估计”“带宽”“贝塔分布”等)与术语表基本保持一致 长句拆分和被动语态转换处理得当,读起来符合中文学术写作习惯 Suggestions:
🔍 Diff Quality
Summary: The RNG API modernization (np.random.seed/randn to np.random.default_rng) was correctly synced into the target document's corresponding code cells without affecting unrelated content. This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Pull request overview
Syncs the zh-cn translation of ar1_processes.md with the upstream English lecture change that migrates examples from legacy np.random state to NumPy’s Generator API for random number generation.
Changes:
- Update AR(1) moment-simulation example to accept a
rngparameter and userng.standard_normal()instead ofnp.random.seed/np.random.randn. - Update a later simulation snippet to use
default_rng()+standard_normal()instead ofnp.random.randn. - Refresh translation-sync state metadata (source SHA, sync date, mode, tool version).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lectures/ar1_processes.md | Migrates random draws in code cells to the NumPy Generator API to match upstream. |
| .translate/state/ar1_processes.md.yml | Updates translation sync bookkeeping (source commit/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-intro.
Source PR
#794 - [ar1_processes.md] Update np.random → Generator API
Files Updated
lectures/ar1_processes.md.translate/state/ar1_processes.md.ymlDetails
This PR was created automatically by the translation action.