Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[SCU][Docathon][Add API Legend No.39]add the picture of unique_consecutive #70163

Closed
wants to merge 4 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions python/paddle/tensor/manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3483,6 +3483,13 @@ def unique_consecutive(
[[2, 1, 3],
[3, 0, 1],
[2, 1, 3]])
Deduce continuously repeating elements in Tensor and return a continuous non repeating Tensor.
The above figure shows the deduplication process of a one-dimensional tensor
The following figure shows the process of unfolding a two-dimensional tensor of [3,4] along axis=0, deduplicating it, and then folding it in two dimensions
.. figure:: ../../ images/api_legend/unique-consecutive.png
: width: 500
: alt: Example 2 Diagram
: align: center
"""

if axis is None:
Expand Down