code: def unique_values(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Return the unique elements of an input array ``x``.
  
      .. admonition:: Data-dependent output shape
          :class: important
  
          The shapes of two of the output arrays for this function depend on the data
          values in the input array; hence, array libraries which build computation graphs
          (e.g., JAX, Dask, etc.) may find this function difficult to implement without
          knowing array values. Accordingly, such libraries may choose to omit this
          function. See :ref:`data-dependent-output-shapes` section for more details.
  
      .. note::
         Uniqueness should be determined based on value equality (i.e., ``x_i == x_j``).
         For input arrays having floating-point data types, value-based equality implies
         the following behavior.
  
         -   As ``nan`` values compare as ``False``, ``nan`` values should be considered
             distinct.
         -   As ``-0`` and ``+0`` compare as ``True``, signed zeros should not be
             considered distinct, and the corresponding unique element will be
             implementation-dependent (e.g., an implementation could choose to return
             ``-0`` if ``-0`` occurs before ``+0``).
  
      Parameters
      ----------
      x
          input array. If ``x`` has more than one dimension, the function must flatten
          ``x`` and return the unique elements of the flattened array.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          an array containing the set of unique elements in ``x``. The returned array must
          have the same data type as ``x``.
  
          .. note::
             The order of unique elements is not specified and may vary between
             implementations.
  
      Raises
      ------
      TypeError
          If `x` is not an instance of `ivy.Array` or `ivy.NativeArray`.
  
  
      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.unique_values.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
      --------
      With :class:`ivy.Array` inputs:
  
      >>> import ivy
      >>> a = ivy.array([1, 1, 2, 2, 3, 4, 4, 5])
      >>> ivy.unique_values(a)
      array([1, 2, 3, 4, 5])
  
      >>> b = ivy.array([1, 2, 3, 4, 5])
      >>> ivy.unique_values(b)
      array([1, 2, 3, 4, 5])
  
      >>> c = ivy.array([1.0, 1.0, 2.0, 2.0, 3.0, 4.0, 4.0, 5.0, -0.0, 0.0, float('nan'),
      ...                float('nan')])
      >>> ivy.unique_values(c)
      array([0., 1., 2., 3., 4., 5., nan, -0.])
      """
      return ivy.current_backend(x).unique_values(x, out=out)
  
file_path: ivy/ivy/functional/ivy/set.py
imports: from typing import Union, Tuple, Optional
  import ivy
  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 3 for calling a global function with example usage: unique_values() and returns: ivy