pymc.math.mean#

pymc.math.mean(input, axis=None, dtype=None, op=False, keepdims=False, acc_dtype=None)[source]#

Computes the mean value along the given axis(es) of a tensor input.

Parameters:
axisNone or int or (list of int) (see Sum)

Compute the mean along this axis of the tensor. None means all axes (like numpy).

dtype: None or string

Dtype to cast the result of the inner summation into. For instance, by default, a sum of a float32 tensor will be done in float64 (acc_dtype would be float64 by default), but that result will be casted back in float32.

keepdims: bool

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 original tensor.

acc_dtype: None or string

Dtype to use for the inner summation. This will not necessarily be the dtype of the output (in particular if it is a discrete (int/uint) dtype, the output will be in a float type). If None, then we use the same rules as sum().