-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[stdlib] rename variance
parameter to std
(standard deviation)
#4118
base: main
Are you sure you want to change the base?
[stdlib] rename variance
parameter to std
(standard deviation)
#4118
Conversation
Can we move this test to a separate function (for this is a borderline quality test) and use |
…y distributed random values Signed-off-by: Illia Sheshyn <[email protected]>
Signed-off-by: Illia Sheshyn <[email protected]>
b76ccc1
to
c3c6e5c
Compare
@soraros thanks for the quick review! Do the changes align with what you had in mind? |
return external_call["KGEN_CompilerRT_NormalDouble", Float64]( | ||
mean, variance | ||
) | ||
return external_call["KGEN_CompilerRT_NormalDouble", Float64](mean, std) |
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.
Uhm, can you really just change that? if the underlying function expects a variance and you give it a standard deviation... you'll get another distribution than what you're expecting. You'd have to square the value for this to make sense.
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 thought the bug was that the underlying function expects a std, and the argument was wrongly named?
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.
My bad, didn't read the linked issue
addresses the following issue regarding the argument name in
randn_float64()
as well asrandn
.The choice to go with standard deviation over variance was made based on the existing
random.gauss
function from Python's standard library and numpy'srandom.normal
which both take mean and standard deviation.Things to consider
Changes
randn_float64()
andrandn