pyinterp.DescriptiveStatistics#
- class pyinterp.DescriptiveStatistics(values: Union[dask.array.core.Array, numpy.ndarray], weights: Optional[Union[numpy.ndarray, dask.array.core.Array]] = None, axis: Optional[Union[int, Iterable[int]]] = None, dtype: Optional[numpy.dtype] = None)[source]#
Bases:
object
Univariate descriptive statistics.
Calculates the incremental descriptive statistics from the provided values. The calculation of the statistics is done when the constructor is invoked. Different methods allow to extract the calculated statistics.
- Parameters
values –
Array containing numbers whose statistics are desired.
Note
NaNs are automatically ignored.
weights – An array of weights associated with the values. If not provided, all values are assumed to have equal weight.
axis – Axis or axes along which to compute the statistics. If not provided, the statistics are computed over the flattened array.
dtype – Data type of the returned array. By default, the data type is
numpy.float64
.
See also
Pébay, P., Terriberry, T.B., Kolla, H. et al. Numerically stable, scalable formulas for parallel and online computation of higher-order multivariate central moments with arbitrary weights. Comput Stat 31, 1305–1325, 2016, https://doi.org/10.1007/s00180-015-0637-z
Public Methods
array
()Returns the different statistical variables calculated in a numpy structured table with the following fields:
copy
()Creates a copy of the current descriptive statistics container.
count
()Returns the count of samples.
kurtosis
()Returns the kurtosis of samples.
max
()Returns the maximum of samples.
mean
()Returns the mean of samples.
min
()Returns the minimum of samples.
skewness
()Returns the skewness of samples.
std
([ddof])Returns the standard deviation of samples.
sum
()Returns the sum of samples.
Returns the sum of weights.
var
([ddof])Returns the variance of samples.
Special Methods