rockverse.voxel_image.histogram.Histogram.percentile#
- Histogram.percentile(q)[source]#
Estimate the q-th percentiles by linear interpolation on histogram CDF and bins.
- Parameters:
q (float or array-like of floats) – Percentage or sequence of percentages. Must obey 0<=q<=100.
- Returns:
Percentile values.
- Return type:
float or array-like of floats
Examples
>>> # Compute the 10th percentile >>> p = histogram.percentile(10) >>> # Compute quartiles (25th, 50th, and 75th percentiles) >>> Q1, Q2, Q3 = histogram.percentile([25, 50, 75])