🌐 [translation-sync] [scipy.md] Update np.random → Generator API#63
🌐 [translation-sync] [scipy.md] Update np.random → Generator API#63
Conversation
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-4-6 | Date: 2026-05-08 📝 Translation Quality
Summary: The translation of the three modified sections (Random Variables and Distributions, Other Goodies in scipy.stats, and Exercises) is of high quality. Technical accuracy is strong, terminology follows the reference glossary, and MyST/Markdown formatting is well-preserved. Minor issues include a slight mismatch in register for the 'Other Goodies' section title and minor reordering in exercise instructions that slightly departs from the source structure. No syntax errors were detected. Technical terminology is consistently and accurately translated throughout the modified sections, including correct use of '对数正态分布', '蒙特卡洛', '大数定律', and '贴现因子' in the Exercises section The ### Random Variables and Distributions section is translated with high fidelity, preserving all mathematical notation, code comments, and the explanation of rv_frozen objects and loc/scale parameters ### Other Goodies in scipy.stats correctly translates the linear regression example and documentation link reference, maintaining the instructional flow of the original Formatting is well-preserved across all modified sections: MyST directives, code cells, math blocks, exercise/solution directives, and hints are all correctly maintained The Exercises section handles the multi-part structure (sp_ex01, sp_ex02, sp_ex03, sp_ex1) accurately, with solution blocks and hints properly translated and formatted Suggestions:
🔍 Diff Quality
Summary: All translation changes are correctly applied: code cells updated to use rng-based random generation, the 'functions' text updated, and the sp_ex03 solution updated, all in the correct positions matching the source document changes. This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Pull request overview
This automated translation-sync PR updates the Chinese scipy.md lecture to align with the upstream change from legacy np.random.* calls to the NumPy Generator API (default_rng()), and refreshes the translation sync state metadata accordingly.
Changes:
- Replaced legacy
np.random.*usage withrng = np.random.default_rng()andrng.*calls in examples. - Minor formatting adjustments in the lecture text (spacing around links/refs, code cell cleanup).
- Updated
.translate/state/scipy.md.ymlsync metadata (source SHA, date, mode, tool version).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lectures/scipy.md | Updates lecture code examples to use NumPy’s Generator API for random number generation. |
| .translate/state/scipy.md.yml | Updates translation sync state (source SHA, synced date, mode, tool version). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```{code-cell} python3 | ||
| from scipy.stats import linregress | ||
|
|
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python-programming.
Source PR
#547 - [scipy.md] Update np.random → Generator API
Files Updated
lectures/scipy.md.translate/state/scipy.md.ymlDetails
This PR was created automatically by the translation action.