average(x, axis=None, weights=None, keepdims=False)¶
Calculate weighted average of array elements over a given axis.
weights (None or
Variableor N-dimensional array) – An array holding weights to calculate weighted average. If it is
None, all weights are assumed to be one. When
weightsmust have the same shape of
x. And when
int, it must be 1-D array satisfying
weights.shape == (x.shape[axis],).
keepdims (bool) – If
True, the specified axes are remained as axes of length one.
- Return type