π [translation-sync] [likelihood_ratio_process.md] Update np.random β Generator API - #228
π [translation-sync] [likelihood_ratio_process.md] Update np.random β Generator API#228mmcky 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, fluent, and terminologically consistent, with proper preservation of mathematical formatting and code blocks. Only minor issues were found: one inconsistent translation of 'nature' as 'ζ¬θ΄¨' instead of 'θͺηΆ' in a plot title, and an unexplained addition of font-configuration code not present in the English source, which should be verified as intentional shared infrastructure rather than a translation artifact. Mathematical notation and LaTeX equations are preserved accurately throughout all modified sections Technical terminology (e.g., δΌΌηΆζ―, εΊε°θ΄ε -θ±εΈεζ£εΊ¦, 第δΈη±»/第δΊη±»ιθ――, ζ£ζ΅ζ¦η, θθ¦ζ¦η) is applied consistently and matches standard usage Complex statistical/probabilistic explanations (e.g., KL divergence link to likelihood ratios, Chernoff entropy, ROC curves) are translated clearly and read naturally in academic Chinese Suggestions:
π Diff Quality
Summary: The translation sync correctly applied all RNG refactoring changes (adding rng = np.random.default_rng() and threading rng through function signatures) to the Chinese document while preserving translated prose, frontmatter, and structure. 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_ratio_process.md to align with upstream changes that migrate randomness from legacy np.random.* calls to the NumPy Generator API (via a shared rng = np.random.default_rng()), plus updates the translation sync state metadata.
Changes:
- Introduces a shared
rngand threads it through multiple simulation functions (Beta draws, uniform draws, choices) to replace legacy global RNG usage. - Updates call sites throughout the lecture to pass
rnginto the updated function signatures. - Updates
.translate/state/likelihood_ratio_process.md.ymlto reflect the new source commit SHA, sync date, mode, and tool version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lectures/likelihood_ratio_process.md | Replaces np.random.* with rng.* and updates function signatures/call sites accordingly. |
| .translate/state/likelihood_ratio_process.md.yml | Updates translation-sync state metadata (source SHA, date, mode, tool version). |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @jit | ||
| def simulate_likelihood_ratios(a, b, f_func, g_func, T=50, N=500): | ||
| def simulate_likelihood_ratios(a, b, f_func, g_func, rng, T=50, N=500): | ||
| """ | ||
| Generate N sets of T observations of the likelihood ratio. | ||
| """ |
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python.myst.
Source PR
#976 - [likelihood_ratio_process.md] Update np.random β Generator API
Files Updated
lectures/likelihood_ratio_process.md.translate/state/likelihood_ratio_process.md.ymlDetails
This PR was created automatically by the translation action.