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

Add median to iterable_num #46

Merged
merged 10 commits into from Jan 28, 2020
Merged

Add median to iterable_num #46

merged 10 commits into from Jan 28, 2020

Conversation

AKushWarrior
Copy link
Contributor

@AKushWarrior AKushWarrior commented Jan 25, 2020

I added a median function to iterable_num.

I also reformatted the zero argument functions to getters (which improves readability IMO). I also updated the documentation of average to reflect the actual function.

EDIT: probably shouldn't have changed to getters; it's pretty useless and might break code unnecessarily. Will update PR...

I added a median function to iterable_num.

I also reformatted the zero argument functions to getters (which improves readability IMO). I also updated the documentation of average to reflect the actual function.
@AKushWarrior
Copy link
Contributor Author

Whoops, didn't realize that the tests were based around the current, non-getter API. Will fix and re-pull...

@AKushWarrior AKushWarrior reopened this Jan 25, 2020
@AKushWarrior AKushWarrior changed the title Add median to iterable_num / Reformat iterable_num to getters Add median to iterable_num Jan 25, 2020
@AKushWarrior
Copy link
Contributor Author

Median seems like a logical accompaniment to mean, and has a use-case.

In a similar vein, mode might also be included. However, the mode use-case is too niche for this package, I think.

Also, I noticed that the average documentation was a bit inaccurate, so I cleaned it up...

@passsy
Copy link
Collaborator

passsy commented Jan 26, 2020

I'm fine with adding median but please add tests

@AKushWarrior
Copy link
Contributor Author

AKushWarrior commented Jan 27, 2020

@passsy median tests and null handling have been added. Waiting for review...

@AKushWarrior AKushWarrior requested review from passsy and removed request for simc January 28, 2020 06:14
@passsy passsy merged commit 7524b64 into simc:master Jan 28, 2020
@passsy
Copy link
Collaborator

passsy commented Jan 28, 2020

Thanks for your contribution. is mode() next? 😉

@AKushWarrior AKushWarrior deleted the patch-1 branch January 28, 2020 17:36
@AKushWarrior
Copy link
Contributor Author

Haha, we'll see.

In all seriousness, I might make a PR with some more basic stats (mode, std dev, variance?).

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.

None yet

2 participants