🌐 [translation-sync] [about_py.md] Update np.random → Generator API#64
🌐 [translation-sync] [about_py.md] Update np.random → Generator API#64
Conversation
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-4-6 | Date: 2026-05-09 📝 Translation Quality
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:
🔍 Diff Quality
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. |
There was a problem hiding this comment.
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)andrng.uniform(...)instead ofnp.random.seed(...)/np.random.uniform(...). - Cleaned up stray blank lines/whitespace in the translated markdown.
- Updated
.translate/state/about_py.md.ymlto 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.
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.ymlDetails
This PR was created automatically by the translation action.