Samples.interval (function)
def interval(self, alpha, unit=None, as_quantity=False, wrap_at=None)
Expose the range that contains alpha percent of the distribution.
For Samples, this directly calls Samples.ppf for 0.5 - alpha/2 and 0.5 + alpha/2.
alpha
(float): passed directly to scipy (see link above)unit
(astropy.unit, optional, default=None): unit of the values inx
to expose. If None or not provided, will assume they're 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
.
- (array) endpoints in units
unit
.