Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
eed5e9a9
Commit
eed5e9a9
authored
Jul 19, 2019
by
Raymond Hettinger
Committed by
GitHub
Jul 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-36546: Clean-up comments (GH-14857)
parent
8dbe563a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
Lib/statistics.py
Lib/statistics.py
+3
-9
No files found.
Lib/statistics.py
View file @
eed5e9a9
...
...
@@ -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.
...
...
@@ -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'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment