docstr: ivy.Array instance method variant of ivy.unique_counts. This method
  simply wraps the function, and so the docstring for ivy.unique_counts
  also applies to this method with minimal changes.
  
  Parameters
  ----------
  self
      input array. If ``x`` has more than one dimension, the function must flatten
      ``x`` and return the unique elements of the flattened array.
  
  Returns
  -------
  ret
      a namedtuple ``(values, counts)`` whose
  
      - first element must have the field name ``values`` and must be an
      array containing the unique elements of ``x``.
      The array must have the same data type as ``x``.
      - second element must have the field name ``counts`` and must be an array
      containing the number of times each unique element occurs in ``x``.
      The returned array must have same shape as ``values`` and must
      have the default array index data type.
  
  Examples
  --------
  >>> x = ivy.array([0., 1., 2. , 1. , 0.])
  >>> y = x.unique_counts()
  >>> print(y)
  Results(values=ivy.array([0.,1.,2.]),counts=ivy.array([2,2,1]))
docstr_tok: ["ivy.Array","instance","method","variant","of","ivy.unique_counts",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.unique_counts","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","input","array",".","If","``","x","``","has","more","than","one","dimension",",","the","function","must","flatten","``","x","``","and","return","the","unique","elements","of","the","flattened","array",".","Returns","--","--","--","-","ret","a","namedtuple","``","(","values",",","counts",")","``","whose","-","first","element","must","have","the","field","name","``","values","``","and","must","be","an","array","containing","the","unique","elements","of","``","x","``",".","The","array","must","have","the","same","data","type","as","``","x","``",".","-","second","element","must","have","the","field","name","``","counts","``","and","must","be","an","array","containing","the","number","of","times","each","unique","element","occurs","in","``","x","``",".","The","returned","array","must","have","same","shape","as","``","values","``","and","must","have","the","default","array","index","data","type",".","Examples","--","--","--","--",">",">",">","x","=","ivy.array","(","[","0.",",","1.",",","2.",",","1.",",","0",".","]",")",">",">",">","y","=","x.unique_counts","(",")",">",">",">","print","(","y",")","Results","(","values=ivy.array","(","[","0.,1.,2",".","]",")",",","counts=ivy.array","(","[","2,2,1","]",")",")"]
code: def unique_counts(self: ivy.Array) -> Tuple[ivy.Array, ivy.Array]:
      """ivy.Array instance method variant of ivy.unique_counts. This method
      simply wraps the function, and so the docstring for ivy.unique_counts
      also applies to this method with minimal changes.
  
      Parameters
      ----------
      self
          input array. If ``x`` has more than one dimension, the function must flatten
          ``x`` and return the unique elements of the flattened array.
  
      Returns
      -------
      ret
          a namedtuple ``(values, counts)`` whose
  
          - first element must have the field name ``values`` and must be an
          array containing the unique elements of ``x``.
          The array must have the same data type as ``x``.
          - second element must have the field name ``counts`` and must be an array
          containing the number of times each unique element occurs in ``x``.
          The returned array must have same shape as ``values`` and must
          have the default array index data type.
  
      Examples
      --------
      >>> x = ivy.array([0., 1., 2. , 1. , 0.])
      >>> y = x.unique_counts()
      >>> print(y)
      Results(values=ivy.array([0.,1.,2.]),counts=ivy.array([2,2,1]))
      """
      return ivy.unique_counts(self._data)
  
file_path: ivy/ivy/data_classes/array/set.py
imports: import abc
  from typing import Optional, Tuple
  import ivy
label_desc: Use image node_id 1 for calling the _ArrayWithSet obj's underlying member method code with example usage: obj.unique_counts() and returns: ivy