-
Notifications
You must be signed in to change notification settings - Fork 40
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
Recommend mean((x, y))
rather than middle((x, y))
#147
Conversation
It seems more logical and simpler for users to recommend using the same function. This also helps making Statistics a standalone package (#128) as `mean` will be moved to Julia Base, but `middle` will remain in Statistics.
src/Statistics.jl
Outdated
@@ -109,7 +109,7 @@ if !isdefined(Base, :mean) | |||
f(itr) | |||
catch MethodError |
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.
Unrelated to this PR but notably not how to catch a MethodError
, haha
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.
Woops. I've pushed a commit to make the check stricter.
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.
Unrelated to this PR but notably not how to catch a
MethodError
, haha
haha, that was me :P. Oops.
Apparently this won't be required to make Statistics an upgradable stdlib, but it's probably a good idea anyway. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #147 +/- ##
==========================================
+ Coverage 96.99% 97.01% +0.01%
==========================================
Files 1 1
Lines 433 435 +2
==========================================
+ Hits 420 422 +2
Misses 13 13
☔ View full report in Codecov by Sentry. |
Co-authored-by: Alex Arslan <[email protected]>
It seems more logical and simpler for users to recommend using the same function. This also helps making Statistics a standalone package (#128) as
mean
will be moved to Julia Base, butmiddle
will remain in Statistics.This blocks JuliaLang/julia#46501.
See #131. Cc: @LilithHafner