code: def std(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      axis: Optional[Union[int, Sequence[int]]] = None,
      correction: Union[int, float] = 0.0,
      keepdims: bool = False,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Calculate the standard deviation of the input array ``x``.
  
      **Special Cases**
  
      Let ``N`` equal the number of elements over which to compute the standard deviation.
  
      -   If ``N - correction`` is less than or equal to ``0``,
          the standard deviation is ``NaN``.
      -   If ``x_i`` is ``NaN``, the standard deviation is ``NaN``
          (i.e., ``NaN`` values propagate).
  
      Parameters
      ----------
      x
          input array.
      axis
          axis or axes along which standard deviations must be computed. By default, the
          standard deviation must be computed over the entire array. If a tuple of
          integers, standard deviations must be computed over multiple axes.
          Default: ``None``.
      correction
          degrees of freedom adjustment. Setting this parameter to a value other
          than ``0`` has the effect of adjusting the divisor during the calculation of the
          standard deviation according to ``N-c`` where ``N`` corresponds to the total
          number of elements over which the standard deviation is computed and ``c``
          corresponds to the provided degrees of freedom adjustment. When computing the
          standard deviation of a population, setting this parameter to ``0`` is the
          standard choice (i.e., the provided array contains data constituting an
          entire population). When computing the corrected sample standard deviation,
          setting this parameter to ``1`` is the standard choice (i.e., the provided array
          contains data sampled from a larger population; this is commonly referred to as
          Bessel's correction).
          Default: ``0``.
      keepdims
          if ``True``, the reduced axes (dimensions) must be included in the result as
          singleton dimensions, and, accordingly, the result must be compatible with the
          input array (see :ref:`broadcasting`). Otherwise, if ``False``, the reduced axes
          (dimensions) must not be included in the result. Default: ``False``.
      out
          optional output array, for writing the result to.
  
      Returns
      -------
      ret
          if the standard deviation was computed over the entire array, a zero-dimensional
          array containing the standard deviation; otherwise, a non-zero-dimensional array
          containing the standard deviations. The returned array must have the same data
          type as ``x``.
  
          .. note::
             While this specification recommends that this function only accept input
             arrays having a real-valued floating-point data type, specification-compliant
             array libraries may choose to accept input arrays having an integer data
             type. While mixed data type promotion is implementation-defined, if the input
             array ``x`` has an integer data type, the returned array must have
             the default real-valued floating-point data type.
  
      This function conforms to the `Array API Standard
      <https://data-apis.org/array-api/latest/>`_. This docstring is an extension of the
      `docstring <https://data-apis.org/array-api/latest/
      API_specification/generated/array_api.std.html>`_
      in the standard.
  
      Both the description and the type hints above assumes an array input for simplicity,
      but this function is *nestable*, and therefore also accepts :class:`ivy.Container`
      instances in place of any of the arguments.
  
      Examples
      --------
      >>> x = ivy.array([-1., 0., 1.])
      >>> y = ivy.std(x)
      >>> print(y)
      ivy.array(0.81649661)
  
      >>> x = ivy.array([-1., 0., 1.])
      >>> z = ivy.std(x, correction=1)
      >>> print(z)
      ivy.array(1.)
  
      >>> x = ivy.array([[0., 4.]])
      >>> y = ivy.std(x, keepdims=True)
      >>> print(y)
      ivy.array([[2.]])
  
      >>> x = ivy.array([2., 1.])
      >>> y = ivy.array(0.)
      >>> ivy.std(x, out=y)
      >>> print(y)
      ivy.array(0.5)
  
      >>> x = ivy.array([[-1., -2.], [3., 3.]])
      >>> y = ivy.std(x, axis=1)
      >>> print(y)
      ivy.array([0.5, 0. ])
  
      With :class:`ivy.Container` input:
  
      >>> x = ivy.Container(a=ivy.array([-1., 0., 1.]), b=ivy.array([1.1, 0.2, 1.4]))
      >>> y = x.std()
      >>> print(y)
      {
          a: ivy.array(0.81649661),
          b: ivy.array(0.509902)
      }
  
      >>> x = ivy.Container(a=ivy.array([[1., 3.], [3., 6.]]),
      ...                   b=ivy.array([[ 4., 2.], [2., 1.]]))
      >>> y = x.std(axis=1, keepdims=True)
      >>> print(y)
      {
          a: ivy.array([[1.],
                        [1.5]]),
          b: ivy.array([[1.],
                        [0.5]])
      }
      """
      return current_backend(x).std(
          x,
          axis=axis,
          correction=correction,
          keepdims=keepdims,
          out=out,
      )
  
file_path: ivy/ivy/functional/ivy/statistical.py
imports: from typing import Union, Optional, Sequence
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, to_native_arrays_and_back, handle_out_argument, handle_nestable, handle_array_like_without_promotion, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 6 for calling a global function with example usage: std() and returns: current_backend