Samples.ppf (function)
def ppf(self, q, unit=None, as_quantity=False, wrap_at=None)
Expose the percent point function (ppf; iverse of cdf - percentiles) at
values of q
.
For Samples, this is done manually by sorting all Samples.samples
and mapping q
onto the range of the sum of Samples.weights to select
the appropriate entry from Samples.samples.
See also:
Arguments
q
(float or array): percentiles at which to expose the ppfunit
(astropy.unit, optional, default=None): unit of the exposed values. If None or not provided, will assume they're provided in Samples.unit.as_quantity
(bool, optional, default=False): whether to return an astropy quantity object instead of just the value. Astropy must be installed.wrap_at
(float, None, or False, optional, default=None): value to use for wrapping. See Samples.wrap. If not provided or None, will use the value from Samples.wrap_at. Note: wrapping is computed before changing units, sowrap_at
must be provided according to Samples.unit notunit
.
Returns
- (float or array) ppf values of the same type/shape as
x