- qspec.average ( a , std = None , cov = None , axis = None )[source]
-
- Parameters:
-
- aarray_like
The sample data.
- stdarray_like | None
An array of standard deviations associated with the values in
a. If specified, the weighted average of the uncorrelated sample data and its standard error is returned.- covscalar_nd | None
The covariance matrix associated with the values in
a. If specified, it overridesstdand the weighted average of the correlated sample data and its standard error is returned. If no axis is specified,covmust have shape (a.size, a.size) with elements associated with the values in the flatteneda, otherwise cov must have either shape (a.shape[axis], a.shape[axis]) or (..., a.shape[axis - 1], a.shape[axis], a.shape[axis], a.shape[axis + 1], ...).- axisint_like | None
The axis along which the average is computed.
- Returns:
-
- outtuple[ndarray, ndarray]
The average and its standard error for a given sample
aalong the specifiedaxis.