numpy.var()

numpy.var

numpy.var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False) [source]

Compute the variance along the specified axis.

Returns the variance of the array elements, a measure of the spread of a distribution. The variance is computed for the flattened array by default, otherwise over the specified axis.

Parameters:

a : array_like

Array containing numbers whose variance is desired. If a is not an array, a conversion is attempted.登录查看完整内容