diff --git a/python/paddle/tensor/manipulation.py b/python/paddle/tensor/manipulation.py index 5e77930b026690..7e64b9f59e04a3 100644 --- a/python/paddle/tensor/manipulation.py +++ b/python/paddle/tensor/manipulation.py @@ -5972,6 +5972,13 @@ def as_complex(x: Tensor, name: str | None = None) -> Tensor: the size of the last axis should be 2, which represent the real and imag part of a complex number. The shape of the returned tensor is ``(*,)``. + The image below demonstrates the case that a real 3D-tensor with shape [2, 3, 2] is transformed into a complex 2D-tensor with shape [2, 3]. + + .. image:: https://githubraw.cdn.bcebos.com/PaddlePaddle/docs/develop/docs/images/api_legend/as_complex.png + :width: 500 + :alt: Illustration of as_complex + :align: center + Args: x (Tensor): The input tensor. Data type is 'float32' or 'float64'. name (str|None, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.