-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
simpler example for randn #52252
simpler example for randn #52252
Conversation
As noted by https://discourse.julialang.org/t/how-do-we-julians-win-big-when-the-situation-is-so-unfair/106433/63?u=lmiq the example provided is too complex and does not directly indicate the most typical usage of the `randn` function.
Add simpler example to `randn` function.
I merged in a few more of my changes, hope you don't mind. (I also noticed that the docs were out of date on the supported types due to #44714) |
Possibly you want to mention this is the "standard complex normal distribution", which I believe it is, i.e. same as from MATLAB: https://www.mathworks.com/help/matlab/ref/randn.html#mw_6dadd167-e8bc-42bb-9aaa-9bcfb97f6815 I was expecting circularly symmetric (see that on stack overflow on a question for uniform, and also a square suggested, to show there isn't any one right, as opposed for randn I think). Note, in MATLAB docs there's still an alternative to that "standard" complex randn (it also show e.g. for how to generate Bivariate Normal Random Numbers). I.e. non-standard I would think. Is there a similar way to use randn? All this got me thinking what are possible extensions to e.g. quaternions. https://stackoverflow.com/questions/31600717/how-to-generate-a-random-quaternion-quickly I'm not saying the docs should say anything on this, since Base doesn't have higher-complex, and such docs belong in relevant packages. kieranwynn.github.io/pyquaternion/ Python doesn't have randn I think but numpy does, but it doesn't have for complex it seems, I see a closed and open issue: |
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
As noted here: https://discourse.julialang.org/t/how-do-we-julians-win-big-when-the-situation-is-so-unfair/106433/63?u=lmiq The randn example is overly complicated and does not indicate the simplest usage, which is probably the most typical one. Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
As noted here: https://discourse.julialang.org/t/how-do-we-julians-win-big-when-the-situation-is-so-unfair/106433/63?u=lmiq
The randn example is overly complicated and does not indicate the simplest usage, which is probably the most typical one.