🌐 [translation-sync] [likelihood_var.md] Update np.random → Generator API - #225
🌐 [translation-sync] [likelihood_var.md] Update np.random → Generator API#225mmcky 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 changed sections is accurate and fluent overall, correctly preserving mathematical content, code structure, and technical terminology. Minor issues include a slight loss of nuance in the 'connect to' phrasing in the Application section, an inconsistency in how the recurring 'nature = f/g' plot title phrase is handled (left untranslated in earlier examples but translated in the Samuelson section), and unexplained added font-configuration code not present in the source. No syntax errors were found in code blocks, math blocks, or MyST directives. Mathematical notation and LaTeX equations are preserved accurately across all changed sections Code comments are consistently and naturally translated into Chinese while preserving code functionality Technical terminology such as '似然比过程', '对数似然', '边际消费倾向', '加速系数' is used correctly and consistently with the glossary Suggestions:
🔍 Diff Quality
Summary: The rng-related changes (import, rng = np.random.default_rng(), and function signature updates for simulate_var/simulate_samuelson and their call sites) were correctly and positionally mirrored in the target document, with structure and heading metadata unaffected and correctly preserved. Issues:
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 lecture likelihood_var.md to use NumPy’s Generator API (via np.random.default_rng()) instead of legacy np.random.* calls, aligning the translated content with the upstream source PR.
Changes:
- Introduced a module-level
rng = np.random.default_rng()and replacednp.random.randnwithrng.standard_normal. - Updated
simulate_var/simulate_samuelsonto accept an RNG and wired all call sites accordingly (including SciPymvn.rvs(..., random_state=rng)). - Updated translation sync state metadata (
source-sha,synced-at,mode,tool-version).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lectures/likelihood_var.md | Switches simulation randomness to the Generator API and threads rng through simulation helpers and call sites. |
| .translate/state/likelihood_var.md.yml | Updates translation-sync bookkeeping to reflect the new upstream source SHA and sync run. |
💡 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
#995 - [likelihood_var.md] Update np.random → Generator API
Files Updated
lectures/likelihood_var.md.translate/state/likelihood_var.md.ymlDetails
This PR was created automatically by the translation action.