Skip to content

Commit

Permalink
Percentile function requires 6 parameters to make decent estimates
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjw committed Aug 1, 2018
1 parent ae718ba commit 9ec88d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web3/utils/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
def percentile(values=None, percentile=None):
"""Calculates a simplified weighted average percentile
"""
if values in [None, tuple(), []] or len(values) < 3:
raise InsufficientData("Expected a sequence of at least 3 integers, got {0}".format(values))
if values in [None, tuple(), []] or len(values) <= 6:
raise InsufficientData("Expected a sequence of at least 6 integers, got {0}".format(values))
if percentile is None:
raise ValueError("Expected a percentile choice, got {0}".format(percentile))

Expand Down

0 comments on commit 9ec88d8

Please sign in to comment.