Samples.median (function)
def median(self, unit=None, as_quantity=False, wrap_at=None, N=1000000)
Expose the median of the samples (Samples.samples if Samples.weights
is not provided, otherwise N
draws from Samples.sample)
See also:
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
.N
(int, optional, default=1e6): number of samples to draw before computingmedian
. Only applicable if Samples.weights is not None.
- (float) median of the distribution in units
unit
.