🌐 [translation-sync] [scipy.md] Update np.random → Generator API#120
🌐 [translation-sync] [scipy.md] Update np.random → Generator API#120
Conversation
✅ Deploy Preview for majestic-griffin-10b166 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ 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. Accuracy is strong with correct rendering of statistical and financial concepts. Formatting and MyST structure are fully preserved. Minor improvements include translating 'cdf' with its Persian glossary equivalent in running text, using 'مونتکارلو' consistently per the glossary, and slightly strengthening phrasing in 'Other Goodies'. No syntax errors were found. Mathematical notation and LaTeX equations are perfectly preserved throughout the changed sections Technical terms such as 'چندک' (quantile), 'چگالی' (density), 'رگرسیون خطی ساده' (simple linear regression), and 'امید ریاضی' (expectation) are used accurately and consistently with the reference glossary The exercise descriptions (sp_ex01, sp_ex02, sp_ex03) are translated with high accuracy, preserving all mathematical and financial concepts such as 'اختیار خرید اروپایی', 'توزیع لگاریتم نرمال', and 'قانون اعداد بزرگ' Code cells, hints, and solution blocks retain correct MyST directive syntax throughout the modified sections The sentence structure flows naturally in Persian academic register, avoiding overly literal constructions Suggestions:
🔍 Diff Quality
Summary: All translation changes are correctly applied: code cells updated to use rng-based API in the same positions as the source, translated prose adjusted accordingly, and the frontmatter heading-map is unchanged and still valid. This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Pull request overview
This translation-sync PR updates the Persian scipy.md lecture to match upstream changes that move examples from the legacy np.random.* global RNG API to the newer np.random.default_rng() Generator-based API.
Changes:
- Replaced
np.random.betaandnp.random.randnusage with aGeneratorinstance (rng) andrng.beta/rng.standard_normal. - Added
rng = np.random.default_rng()in relevant sections. - Updated translation sync state metadata (
source-sha,synced-at, model, 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 random-number examples to use default_rng() / Generator API. |
| .translate/state/scipy.md.yml | Updates translation sync metadata to reflect the new upstream source and tooling. |
💡 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.