- IArray.var(axis: Optional[Union[int, tuple]] = None, cfg: Optional[Config] = None, **kwargs)#
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.
axis¶ (None, int, tuple of ints, optional) – Axis or axes along which the reduction is performed. The default (axis = None) is perform the reduction over all dimensions of the input array. If this is a tuple of ints, a reduction is performed on multiple axes, instead of a single axis or all the axes as default.
var – Variance of a. If axis is None, the result is a value. If axis is given, the result is an array of dimension a.ndim - len(axis). Its dtype is np.float32 when the dtype of
ais np.float32 and np.float64 otherwise.
- Return type
IArray container or float