Skip to content

Commit

Permalink
updated container example
Browse files Browse the repository at this point in the history
  • Loading branch information
kamlishgoswami committed Oct 13, 2023
1 parent 45d2734 commit d37878c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ivy/data_classes/container/experimental/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1282,19 +1282,19 @@ def unsorted_segment_mean(
Examples
--------
>>> import ivy
>>> x = ivy.Container([1.0, 2.0, 3.0, 4.0])
>>> data = ivy.Container([1.0, 2.0, 3.0, 4.0])
>>> segment_ids = ivy.Container([0, 0, 0, 0])
>>> num_segments = 1
>>> result = x.unsorted_segment_mean(segment_ids, num_segments)
>>> result = ivy.unsorted_segment_mean(data,segment_ids, num_segments)
>>> result
ivy.Container([2.5])
>>> y = ivy.Container([1.0, 2.0, 3.0, 4.0, 5.0, 6.0])
>>> data = ivy.Container([1.0, 2.0, 3.0, 4.0, 5.0, 6.0])
>>> segment_ids = ivy.Container([0, 0, 1, 1, 2, 2])
>>> num_segments = 3
>>> result = y.unsorted_segment_mean(segment_ids, num_segments)
>>> result = ivy.unsorted_segment_mean(data,segment_ids, num_segments)
>>> result
ivy.Container([1.5, 3.5, 5.5])
ivy.Container([[1.5, 3.5, 5.5],[1.5, 3.5, 5.5],[1.5, 3.5, 5.5]])
"""
return self.static_unsorted_segment_mean(
self,
Expand Down

0 comments on commit d37878c

Please sign in to comment.