blosc2.mean#

blosc2.mean(ndarr: NDArray | NDField | C2Array, axis=None, dtype=None, keepdims=False, **kwargs)#

Return the arithmetic mean along the specified axis.

Parameters:
  • ndarr (NDArray or NDField or C2Array or LazyExpr) – The input array or expression.

  • axis (int or tuple of ints, optional) – Axis or axes along which the means are computed. The default is to compute the mean of the flattened array.

  • dtype (np.dtype, optional) – Type to use in computing the mean. For integer inputs, the default is float32; for floating point inputs, it is the same as the input dtype.

  • keepdims (bool, optional) – If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.

  • kwargs (dict, optional) – Keyword arguments that are supported by the empty() constructor.

Returns:

mean_along_axis – The mean of the elements along the axis.

Return type:

np.ndarray or NDArray or scalar

References

np.mean