Skip to content

🌐 [translation-sync] [theil_2.md] Update np.random → Generator API - #216

Open
mmcky wants to merge 2 commits into
mainfrom
translation-sync-2026-07-31T23-19-29-pr-1005
Open

🌐 [translation-sync] [theil_2.md] Update np.random → Generator API#216
mmcky wants to merge 2 commits into
mainfrom
translation-sync-2026-07-31T23-19-29-pr-1005

Conversation

@mmcky

@mmcky mmcky commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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.yml

Details

  • Source Language: en
  • Target Language: zh-cn
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

Copilot AI review requested due to automatic review settings July 31, 2026 23:19
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Jul 31, 2026
@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit 5539012
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6a6d2d85ad8a81000843164c
😎 Deploy Preview https://deploy-preview-216--astonishing-narwhal-a8fc64.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

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-07-31
Routing: editor — 1 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other)


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 9/10
Terminology 9/10
Formatting 10/10
Overall 9.2/10

Summary: 该修改部分(“有稳健性:预防性储蓄”)翻译质量很高,准确传达了原文关于稳健性下预防性储蓄机制的技术内容,术语使用与术语表一致,数学公式和代码块格式完整无误,仅有个别措辞可进一步打磨但不影响理解。 “有稳健性:预防性储蓄”部分的专业术语(如“确定性等价”“最坏情形”“预防性储蓄”)翻译准确且与术语表一致 数学公式与代码块完整保留,交叉引用标签未被破坏 长句的拆分和逻辑关系(如“只有期望算子改变”)清晰自然,符合中文学术表达习惯

Suggestions:

  • [minor · accuracy] lectures/theil_2.md — ### 有稳健性:预防性储蓄: 英文 'follows from the robust permanent income formula with the distorted persistence' 被译为“由带有扭曲持续性的稳健永久收入公式得出”,意思基本保留,但“扭曲持续性”对应 'distorted persistence' 略显生硬,可考虑更明确地表达为“扭曲后的持续性参数”以增强可读性。 → 创新尺度 $\tilde{\nu}$ 由带有扭曲后持续性参数的稳健永久收入公式得出;
  • [nit · fluency] lectures/theil_2.md — ### 有稳健性:预防性储蓄: “消费规则取确定性等价形式”一句稍显简略,英文为 'The consumption rule takes the certainty-equivalent form',译文准确但可以增加“……的”结构使句子更顺畅,此为风格性建议,非必须修改。 → 消费规则采取确定性等价的形式

🔍 Diff Quality

Check Status
Scope Correct
Position Correct
Structure Preserved
Heading-map Correct
Overall 10/10

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(...) with rng = 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.

@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request July 31, 2026 23:54 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants