Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions 12 Lib/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,9 @@ def multimode(data):
# intervals, and exactly 100p% of the intervals lie to the left of
# Q7(p) and 100(1 - p)% of the intervals lie to the right of Q7(p)."

# If the need arises, we could add method="median" for a median
# unbiased, distribution-free alternative. Also if needed, the
# distribution-free approaches could be augmented by adding
# method='normal'. However, for now, the position is that fewer
# options make for easier choices and that external packages can be
# used for anything more advanced.
# If needed, other methods could be added. However, for now, the
# position is that fewer options make for easier choices and that
# external packages can be used for anything more advanced.

def quantiles(dist, /, *, n=4, method='exclusive'):
'''Divide *dist* into *n* continuous intervals with equal probability.
Expand All @@ -620,9 +617,6 @@ def quantiles(dist, /, *, n=4, method='exclusive'):
data. The minimum value is treated as the 0th percentile and the
maximum value is treated as the 100th percentile.
'''
# Possible future API extensions:
# quantiles(data, already_sorted=True)
# quantiles(data, cut_points=[0.02, 0.25, 0.50, 0.75, 0.98])
if n < 1:
raise StatisticsError('n must be at least 1')
if hasattr(dist, 'inv_cdf'):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.