Skip to content

Commit

Permalink
Fix doc formatting for weighted_quantile
Browse files Browse the repository at this point in the history
  • Loading branch information
blowekamp committed Feb 27, 2024
1 parent ebed866 commit 025ab38
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pytools/utils/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@

def weighted_quantile(values, quantiles, sample_weight=None, values_sorted=False, old_style=False):
"""Very close to numpy.percentile, but supports weights.
NOTE: quantiles should be in [0, 1]!
.. note:: quantiles should be in [0, 1]!
:param values: numpy.array with data
:param quantiles: array-like with many quantiles needed
:param sample_weight: array-like of the same length as `array`
:param values_sorted: bool, if True, then will avoid sorting of
initial array
initial array
:param old_style: if True, will correct output to be consistent
with numpy.percentile.
with numpy.percentile.
:return: numpy.array with computed quantiles.
"""
values = np.array(values)
Expand Down

0 comments on commit 025ab38

Please sign in to comment.