docstr: Compute the mean of values in the array 'self' based on segment
  identifiers.
  
  Parameters
  ----------
  self : ivy.Array
      The array from which to gather values.
  segment_ids : ivy.Array
      Must be in the same size with the first dimension of `self`. Has to be
      of integer data type. The index-th element of `segment_ids` array is
      the segment identifier for the index-th element of `self`.
  num_segments : Union[int, ivy.Array]
      An integer or array representing the total number of distinct segment IDs.
  
  Returns
  -------
  ret : ivy.Array
      The output array, representing the result of a segmented mean operation.
      For each segment, it computes the mean of values in `self` where
      `segment_ids` equals to segment ID.
  
  Examples
  --------
  >>> data = ivy.array([1.0, 2.0, 3.0, 4.0])
  >>> segment_ids = ivy.array([0, 0, 0, 0])
  >>> num_segments = 1
  >>> result = ivy.unsorted_segment_mean(data, segment_ids, num_segments)
  >>> result
  ivy.array([2.5])
  
  >>> data = ivy.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0])
  >>> segment_ids = ivy.array([0, 0, 1, 1, 2, 2])
  >>> num_segments = 3
  >>> result = ivy.unsorted_segment_mean(data, segment_ids, num_segments)
  >>> result
  ivy.array([[1.5, 3.5, 5.5],[1.5, 3.5, 5.5],[1.5, 3.5, 5.5]])
docstr_tok: ["Compute","the","mean","of","values","in","the","array","'self","'","based","on","segment","identifiers",".","Parameters","--","--","--","--","--","self",":","ivy.Array","The","array","from","which","to","gather","values",".","segment_ids",":","ivy.Array","Must","be","in","the","same","size","with","the","first","dimension","of","`","self","`",".","Has","to","be","of","integer","data","type",".","The","index-th","element","of","`","segment_ids","`","array","is","the","segment","identifier","for","the","index-th","element","of","`","self","`",".","num_segments",":","Union","[","int",",","ivy.Array","]","An","integer","or","array","representing","the","total","number","of","distinct","segment","IDs",".","Returns","--","--","--","-","ret",":","ivy.Array","The","output","array",",","representing","the","result","of","a","segmented","mean","operation",".","For","each","segment",",","it","computes","the","mean","of","values","in","`","self","`","where","`","segment_ids","`","equals","to","segment","ID",".","Examples","--","--","--","--",">",">",">","data","=","ivy.array","(","[","1.0",",","2.0",",","3.0",",","4.0","]",")",">",">",">","segment_ids","=","ivy.array","(","[","0",",","0",",","0",",","0","]",")",">",">",">","num_segments","=","1",">",">",">","result","=","ivy.unsorted_segment_mean","(","data",",","segment_ids",",","num_segments",")",">",">",">","result","ivy.array","(","[","2.5","]",")",">",">",">","data","=","ivy.array","(","[","1.0",",","2.0",",","3.0",",","4.0",",","5.0",",","6.0","]",")",">",">",">","segment_ids","=","ivy.array","(","[","0",",","0",",","1",",","1",",","2",",","2","]",")",">",">",">","num_segments","=","3",">",">",">","result","=","ivy.unsorted_segment_mean","(","data",",","segment_ids",",","num_segments",")",">",">",">","result","ivy.array","(","[","[","1.5",",","3.5",",","5.5","]",",","[","1.5",",","3.5",",","5.5","]",",","[","1.5",",","3.5",",","5.5","]","]",")"]
code: def unsorted_segment_mean(
      self: ivy.Array,
      segment_ids: ivy.Array,
      num_segments: Union[int, ivy.Array],
  ) -> ivy.Array:
      """Compute the mean of values in the array 'self' based on segment
      identifiers.
  
      Parameters
      ----------
      self : ivy.Array
          The array from which to gather values.
      segment_ids : ivy.Array
          Must be in the same size with the first dimension of `self`. Has to be
          of integer data type. The index-th element of `segment_ids` array is
          the segment identifier for the index-th element of `self`.
      num_segments : Union[int, ivy.Array]
          An integer or array representing the total number of distinct segment IDs.
  
      Returns
      -------
      ret : ivy.Array
          The output array, representing the result of a segmented mean operation.
          For each segment, it computes the mean of values in `self` where
          `segment_ids` equals to segment ID.
  
      Examples
      --------
      >>> data = ivy.array([1.0, 2.0, 3.0, 4.0])
      >>> segment_ids = ivy.array([0, 0, 0, 0])
      >>> num_segments = 1
      >>> result = ivy.unsorted_segment_mean(data, segment_ids, num_segments)
      >>> result
      ivy.array([2.5])
  
      >>> data = ivy.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0])
      >>> segment_ids = ivy.array([0, 0, 1, 1, 2, 2])
      >>> num_segments = 3
      >>> result = ivy.unsorted_segment_mean(data, segment_ids, num_segments)
      >>> result
      ivy.array([[1.5, 3.5, 5.5],[1.5, 3.5, 5.5],[1.5, 3.5, 5.5]])
      """
      return ivy.unsorted_segment_mean(
          self._data, segment_ids, num_segments
      )
  
file_path: ivy/ivy/data_classes/array/experimental/creation.py
imports: import abc
  from typing import Optional, Union
  import ivy
label_desc: Use image node_id 7 for calling the _ArrayWithCreationExperimental obj's underlying member method code with example usage: obj.unsorted_segment_mean(segment_ids, num_segments) and returns: ivy