var(x_gpu, ddof=0, axis=None, stream=None, 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.
- x_gpu (pycuda.gpuarray.GPUArray) – Array containing numbers whose variance is desired.
- ddof (int (optional)) – “Delta Degrees of Freedom”: the divisor used in computing the
N - ddof, where
Nis the number of elements. Setting
ddof = 1is equivalent to applying Bessel’s correction.
- axis (int (optional)) – Axis along which the variance are computed. The default is to compute the variance of the flattened array.
- stream (pycuda.driver.Stream (optional)) – Optional CUDA stream in which to perform this calculation
- keepdims (bool (optional, default False)) – If True, the axes which are reduced are left in the result as dimensions with size one.
out – variance of elements, or variances of elements along the desired axis.