Skip to content

🌐 [translation-sync] [about_py.md] Update np.random → Generator API#64

Open
mmcky wants to merge 2 commits intomainfrom
translation-sync-2026-05-09T05-36-58-pr-548
Open

🌐 [translation-sync] [about_py.md] Update np.random → Generator API#64
mmcky wants to merge 2 commits intomainfrom
translation-sync-2026-05-09T05-36-58-pr-548

Conversation

@mmcky
Copy link
Copy Markdown
Contributor

@mmcky mmcky commented May 9, 2026

Automated Translation Sync

This PR contains automated translations from QuantEcon/lecture-python-programming.

Source PR

#548 - [about_py.md] Update np.random → Generator API

Files Updated

  • ✏️ lectures/about_py.md
  • ✏️ .translate/state/about_py.md.yml

Details

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

This PR was created automatically by the translation action.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-4-6 | Date: 2026-05-09


📝 Translation Quality

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

Summary: The translation of the 'Networks and Graphs' section is of high quality. Technical terminology is accurate, the formatting is well-preserved including all code blocks and comments, and the Chinese reads naturally. The only minor issue is a slightly awkward phrasing ('我们有兴趣研究') which is a literal rendering of 'we are interested in studying' - a more natural Chinese expression could be used, but this is a minor stylistic point rather than an error. The key technical terms are accurately translated: '生产网络' (production networks), '最短路径长度' (shortest path length), '中心节点' (central node) all correctly rendered Code comments within the Networks and Graphs section are accurately translated, preserving the educational intent of the original The phrase 'among many other things' is naturally rendered as '还有很多其他功能' which reads fluently in Chinese The description of node coloring by shortest path length from a central node is accurately and clearly conveyed in Chinese

Suggestions:

  • Networks and Graphs section - '我们有兴趣研究' → Consider '我们感兴趣的研究对象包括' or simply '例如,我们希望研究' to better match the source's 'we are interested in studying'

🔍 Diff Quality

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

Summary: The translation document correctly mirrors the source changes: the NetworkX code block was updated from np.random.seed to rng = np.random.default_rng pattern, blank lines between sections were removed to match source, and all other structure, metadata, and heading mappings are preserved.


This review was generated automatically by action-translation review mode.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Syncs the zh-cn translation of about_py.md with upstream changes that migrate examples from legacy np.random seeding to NumPy’s Generator API, and refreshes translation sync state metadata.

Changes:

  • Updated the NetworkX example to use np.random.default_rng(1234) and rng.uniform(...) instead of np.random.seed(...) / np.random.uniform(...).
  • Cleaned up stray blank lines/whitespace in the translated markdown.
  • Updated .translate/state/about_py.md.yml to reflect 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/about_py.md Updates the random-number generation example to the Generator API and trims extraneous blank lines.
.translate/state/about_py.md.yml Updates translation-sync tracking metadata (source SHA/date/mode/tool version).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants