Distribution¶
-
class
astropy.uncertainty.Distribution[source]¶ Bases:
objectA scalar value or array values with associated uncertainty distribution.
This object will take its exact type from whatever the
samplesargument is. In general this is expected to be anQuantityornumpy.ndarray, although anything compatible withnumpy.asanyarrayis possible.See also: http://docs.astropy.org/en/stable/uncertainty/
Parameters: - samples : array-like
The distribution, with sampling along the leading axis. If 1D, the sole dimension is used as the sampling axis (i.e., it is a scalar distribution).
Attributes Summary
distributionn_samplesThe number of samples of this distribution. pdf_madThe median absolute deviation of this distribution. pdf_meanThe mean of this distribution. pdf_medianThe median of this distribution. pdf_smadThe median absolute deviation of this distribution rescaled to match the standard deviation for a normal distribution. pdf_stdThe standard deviation of this distribution. pdf_varThe variance of this distribution. Methods Summary
pdf_histogram(**kwargs)Compute histogram over the samples in the distribution. pdf_percentiles(percentile, **kwargs)Compute percentiles of this Distribution. view([dtype, type])Attributes Documentation
-
distribution¶
-
pdf_mad¶ The median absolute deviation of this distribution.
-
pdf_mean¶ The mean of this distribution.
-
pdf_median¶ The median of this distribution.
-
pdf_smad¶ The median absolute deviation of this distribution rescaled to match the standard deviation for a normal distribution.
-
pdf_std¶ The standard deviation of this distribution.
-
pdf_var¶ The variance of this distribution.
Methods Documentation
-
pdf_histogram(**kwargs)[source]¶ Compute histogram over the samples in the distribution.
Parameters: - All keyword arguments are passed into `astropy.stats.histogram`. Note
- That some of these options may not be valid for some multidimensional
- distributions.
Returns: - hist : array
The values of the histogram. Trailing dimension is the histogram dimension.
- bin_edges : array of dtype float
Return the bin edges
(length(hist)+1). Trailing dimension is the bin histogram dimension.