(x_gpu, ddof=0, axis=None, stream=None, keepdims=False)
return out
Compute the standard deviation along the specified axis.

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

    Parameters
    ----------
    x_gpu : pycuda.gpuarray.GPUArray
        Array containing numbers whose std is desired.
    ddof : int (optional)
        "Delta Degrees of Freedom": the divisor used in computing the 
        variance is ``N - ddof``, where ``N`` is the number of elements.
        Setting ``ddof = 1`` is equivalent to applying Bessel's
        correction.
    axis : int (optional)
        Axis along which the std are computed. The default is to
        compute the std 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.

    Returns
    -------
    out : pycuda.gpuarray.GPUArray or float
        std of elements, or stds of elements along the desired axis.
Compute the standard deviation along the specified axis.
Compute the standard deviation along the specified axis .
def std(x_gpu, ddof=0, axis=None, stream=None, keepdims=False):
    """
    Compute the standard deviation along the specified axis.

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

    Parameters
    ----------
    x_gpu : pycuda.gpuarray.GPUArray
        Array containing numbers whose std is desired.
    ddof : int (optional)
        "Delta Degrees of Freedom": the divisor used in computing the 
        variance is ``N - ddof``, where ``N`` is the number of elements.
        Setting ``ddof = 1`` is equivalent to applying Bessel's
        correction.
    axis : int (optional)
        Axis along which the std are computed. The default is to
        compute the std 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.

    Returns
    -------
    out : pycuda.gpuarray.GPUArray or float
        std of elements, or stds of elements along the desired axis.
    """
    def _inplace_pow(x_gpu, p, stream):
        func = elementwise.get_pow_kernel(x_gpu.dtype)
        func.prepared_async_call(x_gpu._grid, x_gpu._block, stream,
                    p, x_gpu.gpudata, x_gpu.gpudata, x_gpu.mem_size)

    if axis is None:
        return var(x_gpu, ddof=ddof, stream=stream, keepdims=keepdims) ** 0.5
    else:
        out = var(x_gpu, ddof=ddof, axis=axis, stream=stream, keepdims=keepdims)
        _inplace_pow(out, 0.5, stream)
    return out
def std ( x_gpu , ddof = 0 , axis = None , stream = None , keepdims = False ) : def _inplace_pow ( x_gpu , p , stream ) : func = elementwise . get_pow_kernel ( x_gpu . dtype ) func . prepared_async_call ( x_gpu . _grid , x_gpu . _block , stream , p , x_gpu . gpudata , x_gpu . gpudata , x_gpu . mem_size ) if axis is None : return var ( x_gpu , ddof = ddof , stream = stream , keepdims = keepdims ) ** 0.5 else : out = var ( x_gpu , ddof = ddof , axis = axis , stream = stream , keepdims = keepdims ) _inplace_pow ( out , 0.5 , stream ) return out