Skip to content
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

Merged
merged 4 commits into from
Aug 28, 2023
Merged

Conversation

nalimilan
Copy link
Member

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.

This blocks JuliaLang/julia#46501.

See #131. Cc: @LilithHafner

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.
@nalimilan nalimilan requested review from bkamins and ararslan August 15, 2023 10:30
@@ -109,7 +109,7 @@ if !isdefined(Base, :mean)
f(itr)
catch MethodError
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Contributor

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.

src/Statistics.jl Outdated Show resolved Hide resolved
@nalimilan
Copy link
Member Author

Apparently this won't be required to make Statistics an upgradable stdlib, but it's probably a good idea anyway.

src/Statistics.jl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Aug 27, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (14438ab) 96.99% compared to head (ac7349f) 97.01%.
Report is 1 commits behind head on master.

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              
Files Changed Coverage Δ
src/Statistics.jl 97.01% <100.00%> (+0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

test/runtests.jl Outdated Show resolved Hide resolved
Co-authored-by: Alex Arslan <[email protected]>
@nalimilan nalimilan merged commit 04e5d89 into master Aug 28, 2023
@nalimilan nalimilan deleted the nl/mean branch August 28, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants