🌐 [translation-sync] [python_essentials.md] Update np.random → Generator API#117
🌐 [translation-sync] [python_essentials.md] Update np.random → Generator API#117
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-02 📝 Translation Quality
Summary: The Exercises section translation is of high quality. All exercise instructions, hints, solutions, and mathematical content are accurately translated. The Persian reads naturally with appropriate academic register. Technical terms are consistently handled. Only minor stylistic refinements could improve the translation further, such as standardizing function notation style and minor phrasing adjustments for formal register. Exercise instructions are accurately translated with all technical details preserved, including mathematical notation and code references Solution labels like 'راهحل قسمت 1' and 'راهحل قسمت 2' are consistently and naturally translated throughout the Exercises section Hint sections are correctly translated with proper dropdown formatting preserved The term 'خلاصه لیست' for 'list comprehension' and 'ضرب داخلی' for 'inner product' are appropriate and consistent with the glossary conventions Mathematical expressions and LaTeX equations in exercise descriptions are fully preserved without alteration Suggestions:
🔍 Diff Quality
Summary: The translation target document correctly mirrors the source changes in exercise 6, updating the deprecated 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 Persian python_essentials lecture to match upstream source PR #544, which modernizes one exercise and its solution from the legacy global np.random API to NumPy’s Generator API. In this codebase, that keeps the translated lecture content aligned with the English source while also refreshing the translation state metadata.
Changes:
- Replaced
np.random.randn()with a localrng = np.random.default_rng()plusrng.standard_normal()in the affected exercise snippet. - Applied the same Generator-based update to the corresponding solution snippet.
- Refreshed
.translate/state/python_essentials.md.ymlwith the new source SHA, sync date, model, mode, and tool version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
lectures/python_essentials.md |
Syncs one exercise/solution pair to the upstream NumPy Generator API example. |
.translate/state/python_essentials.md.yml |
Updates translation sync bookkeeping for this lecture. |
💡 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-programming.
Source PR
#544 - [python_essentials.md] Update np.random → Generator API
Files Updated
lectures/python_essentials.md.translate/state/python_essentials.md.ymlDetails
This PR was created automatically by the translation action.