-
-
Notifications
You must be signed in to change notification settings - Fork 54
np.ones * alpha -->> np.full #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lectures/markov_asset.md
Outdated
| I = np.identity(n) | ||
| v = solve(I - β * K, β * K @ np.ones(n)) | ||
| v = solve(I - β * K, K @ np.full(n, β)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shlff , please revert this back to the original, since the original is a bit closer to the maths. Thanks.
lectures/markov_asset.md
Outdated
| I = np.identity(ap.n) | ||
| Ones = np.ones(ap.n) | ||
| v = solve(I - β * J, β * J @ Ones) | ||
| Full = np.full(ap.n, β) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shlff , please revert this back to the original. Ones is a natural matrix and the code is easier to read in the original.
lectures/markov_asset.md
Outdated
| I = np.identity(ap.n) | ||
| Ones = np.ones(ap.n) | ||
| p = solve(I - β * M, β * ζ * M @ Ones) | ||
| Full = np.full(ap.n, β * ζ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
lectures/complex_and_trig.md
Outdated
| π = np.pi | ||
| zeros = np.zeros | ||
| ones = np.ones | ||
| full = np.full |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good strategy. One can use just np.full in line 140 (only one place).
Same for zeros.
oyamad
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shlff Good work!
Hi @jstac and @oyamad , thanks for your nice comments. This PR fix #165 's remaining patterns, mentioned by @oyamad , except for the following:
V = np.ones(len(mcm.w_vec))Do you think we should also change the
np.onespattern tonp.fullin the above lecture?