[scipy.md] Update np.random → Generator API#547
Open
Chihiro2000GitHub wants to merge 1 commit intomainfrom
Open
[scipy.md] Update np.random → Generator API#547Chihiro2000GitHub wants to merge 1 commit intomainfrom
Chihiro2000GitHub wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates
lectures/scipy.mdas part of the NumPy random API migration described in QuantEcon/meta#299.The changes are limited to the following:
np.random.beta(...)withrng = np.random.default_rng()/rng.beta(...)np.random.randn(...)withrng.standard_normal(...)in "12.3.3. Other Goodies in scipy.stats"np.random.randn(...)withrng.standard_normal(...)in the Monte Carlo exercise solution (Exercise 12.3)Each code block defines its own
rnglocally. The exercise solution block remains self-contained.No fixed seed is introduced, as the original lecture did not use one.
No Numba-related code was present in this file.
Hi @mmcky and @HumphreyYang, I'd be grateful if you could take a look when you have time.