🌐 [translation-sync] [svd_intro.md] Update np.random → Generator API - #218
🌐 [translation-sync] [svd_intro.md] Update np.random → Generator API#218mmcky wants to merge 2 commits into
Conversation
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-5 | Date: 2026-07-31 📝 Translation Quality
Summary: The translation of the two modified sections (Four Fundamental Subspaces and Full and Reduced SVD's) is accurate, technically sound, and preserves the mathematical formatting well. Terminology is consistent with the glossary. Minor issues include a slightly awkward sentence split when introducing vectors u_i and v_i, and inconsistent spacing between Chinese text and inline math in a few bullet points. No critical syntax errors were found in the changed sections. Mathematical notation and equation labels (eq:SVD101, eq:fullSVDpartition, etc.) are preserved accurately across the changed sections Technical vocabulary such as 完全SVD/简化SVD, 列空间, 零空间, 左零空间, 正交补 is translated consistently and matches standard linear algebra terminology The logical flow and structure of the Four Fundamental Subspaces and Full/Reduced SVD sections closely mirrors the source, preserving all equations and code blocks intact Suggestions:
🔍 Diff Quality
Summary: The translation sync correctly applied the rng.default_rng() refactor in the same two code cells with no structural or metadata regressions. 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 svd_intro lecture to match the upstream change from NumPy’s legacy global RNG (np.random.rand) to the recommended Generator API (np.random.default_rng()), keeping the lecture’s random-matrix examples consistent with current NumPy best practices.
Changes:
- Introduces a
rng = np.random.default_rng()instance in the lecture to serve as the shared random number generator. - Replaces
np.random.rand(...)calls withrng.random((...))in SVD example code cells. - Updates 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/svd_intro.md |
Switches random-number usage in code cells to the Generator API via a shared rng. |
.translate/state/svd_intro.md.yml |
Updates translation sync state to reflect the new upstream source commit and tooling metadata. |
💡 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.myst.
Source PR
#1003 - [svd_intro.md] Update np.random → Generator API
Files Updated
lectures/svd_intro.md.translate/state/svd_intro.md.ymlDetails
This PR was created automatically by the translation action.