Ë
    –\;j¢®  ã                   ól  — d dl Zd dlZd dlmZmZ d dlmZmZ d dlm	Z	m
Z
mZ d dlmZ d dlmZ g Ze
j"                  j$                  j&                  e
j"                  j$                  j(                  e
j"                  j$                  j*                  e
j"                  j$                  j,                  e
j"                  j$                  j.                  e
j"                  j$                  j0                  gZed d„«       Zed d„«       Zed d	„«       Zed d
„«       Zd!d„Zed d„«       Zed d„«       Z ed d„«       Z!ed d„«       Z"ed d„«       Z#ed d„«       Z$ed d„«       Z%ed d„«       Z&ed"d„«       Z'ed d„«       Z(ed d„«       Z)ed d„«       Z*ed d„«       Z+ed d„«       Z,ed d„«       Z-ed d„«       Z.d d„Z/d d„Z0d d„Z1d#d„Z2y)$é    N)Ú_C_opsÚin_dynamic_mode)Ú
check_typeÚcheck_variable_and_dtype)Úconvert_np_dtype_to_dtype_ÚcoreÚdygraph_only)ÚVariable)ÚLayerHelperc                 ó,   — t        j                  | «      S )aŽ  
    Calculate elementwise sin of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = sin(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.sin(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[-0.90929741,  0.84147102])
    )r   Ú
sparse_sin©ÚxÚnames     ú\G:\00. PROJECTS\API\Inventory\templateJSON\kerjaOCR\Lib\site-packages\paddle/sparse/unary.pyÚsinr   $   ó   € ô< ×Ñ˜QÓÐó    c                 ó,   — t        j                  | «      S )aŒ  
    Calculate elementwise tan of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = tan(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.tan(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[2.18503976, 1.55740774])
    )r   Ú
sparse_tanr   s     r   Útanr   E   r   r   c                 ó,   — t        j                  | «      S )a�  
    Calculate elementwise asin of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = asin(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.asin(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[nan       , 1.57079625])
    )r   Úsparse_asinr   s     r   Úasinr   f   ó   € ô< ×Ñ˜aÓ Ð r   c                 ó.   — t        j                  | |«      S )a%  
    Changes the perm order of ``x`` without changing its data, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = transpose(x, perm)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        perm (list|tuple): Permute the input according to the data of perm.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A transposed Sparse Tensor with the same data type as ``x``.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([[-2., 0.], [1., 2.]])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.transpose(sparse_x, [1, 0])
            >>> out
            Tensor(shape=[2, 2], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 0]],
                values=[[-2.,  0.],
                        [ 1.,  2.]])
    )r   Úsparse_transpose)r   Úpermr   s      r   Ú	transposer   ‡   s   € ô@ ×"Ñ" 1 dÓ+Ð+r   c           
      óî  — d}|�d}t        |«      }t        «       rt        j                  | |||«      S |€g }n|g}|||dœ}|r|j	                  | j
                  |dœ«       t        | dg d¢d«       t        |d	t        t        t        t        d«      t        fd«       d}t        |«      }|r|j                  |¬
«      }	n|j                  | j
                  ¬
«      }	|j                  |d| id|	i|¬«       |	S )a
  
    Computes the sum of sparse tensor elements over the given dimension, requiring x to be a SparseCooTensor or SparseCsrTensor.

    Args:
        x (Tensor): An N-D Tensor, the data type is bool, float16, float32, float64, int32 or int64.
        axis (int|list|tuple, optional): The dimensions along which the sum is performed. If
            :attr:`None`, sum all elements of :attr:`x` and return a
            Tensor with a single element, otherwise must be in the
            range :math:`[-rank(x), rank(x))`. If :math:`axis[i] < 0`,
            the dimension to reduce is :math:`rank + axis[i]`.
        dtype (str, optional): The dtype of output Tensor. The default value is None, the dtype
            of output is the same as input Tensor `x`.
        keepdim (bool, optional): Whether to reserve the reduced dimension in the
            output Tensor. The result Tensor will have one fewer dimension
            than the :attr:`x` unless :attr:`keepdim` is true, default
            value is False.
        name (str, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        Tensor: Results of summation operation on the specified axis of input Tensor `x`.
        if `x.dtype='bool'` or `x.dtype='int32'`, it's data type is `'int64'`,
        otherwise it's data type is the same as `x`.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([[-2., 0.], [1., 2.]])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out1 = paddle.sparse.sum(sparse_x)
            >>> out1
            Tensor(shape=[1], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[0],
                values=1.)
            >>> out2 = paddle.sparse.sum(sparse_x, axis=0)
            >>> out2
            Tensor(shape=[1, 2], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0]],
                values=[[-1.,  2.]])
            >>> out3 = paddle.sparse.sum(sparse_x, axis=-1)
            >>> out3
            Tensor(shape=[2], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 1]],
                values=[-2.,  3.])
            >>> out4 = paddle.sparse.sum(sparse_x, axis=1, keepdim=True)
            >>> out4
            Tensor(shape=[2, 1], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 1]],
                values=[[-2.],
                        [ 3.]])
    FNT)ÚaxisÚdtypeÚkeepdim)Úin_dtypeÚ	out_dtyper   ©ÚboolÚfloat32Úfloat64Úint16Úint32Úint64Ú
sparse_sumr!   ©r"   Úout©ÚtypeÚinputsÚoutputsÚattrs)r   r   r   r-   Úupdater"   r   r   ÚintÚlistÚtupler1   r
   r   Ú)create_sparse_variable_for_type_inferenceÚ	append_op)
r   r!   r"   r#   r   Ú
dtype_flagr4   Úop_typeÚhelperr/   s
             r   Úsumr>   ª   s  € ðj €JØÐØˆ
Ü*¨5Ó1ˆäÔÜ× Ñ   D¨%°Ó9Ð9àˆ<Ø‰Dà�6ˆDØ¨¸'ÑBˆáØ�L‰L a§g¡g¸EÑBÔCä ØØòð ô	
ô 	Ø�&œ3¤¤e¬T°$«Z¼ÐBÀLô	
ð ˆÜ˜WÓ%ˆÙØ×BÑBÈÐBÓO‰Cà×BÑBØ—g‘gð Có ˆCð 	×ÑØ # q °E¸3°<Àuð 	ô 	
ð ˆ
r   c                 ó,   — t        j                  | «      S )a‘  
    Calculate elementwise atan of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = atan(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.atan(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[-1.10714877,  0.78539819])
    )r   Úsparse_atanr   s     r   ÚatanrA     r   r   c                 ó,   — t        j                  | «      S )a‘  
    Calculate elementwise sinh of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = sinh(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.sinh(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[-3.62686038,  1.17520118])
    )r   Úsparse_sinhr   s     r   ÚsinhrD   1  r   r   c                 ó,   — t        j                  | «      S )a”  
    Calculate elementwise asinh of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = asinh(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.asinh(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[-1.44363546,  0.88137358])
    )r   Úsparse_asinhr   s     r   ÚasinhrG   R  ó   € ô< ×Ñ˜qÓ!Ð!r   c                 ó,   — t        j                  | «      S )a†  
    Calculate elementwise atanh of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = atanh(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.atanh(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[nan , inf.])
    )r   Úsparse_atanhr   s     r   ÚatanhrK   s  rH   r   c                 ó,   — t        j                  | «      S )a‘  
    Calculate elementwise tanh of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = tanh(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.tanh(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[-0.96402758,  0.76159418])
    )r   Úsparse_tanhr   s     r   ÚtanhrN   ”  r   r   c                 ó,   — t        j                  | «      S )a…  
    Calculate elementwise square of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = square(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.square(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[4., 1.])
    )r   Úsparse_squarer   s     r   ÚsquarerQ   µ  s   € ô< ×Ñ Ó"Ð"r   c                 ó,   — t        j                  | «      S )a�  
    Calculate elementwise sqrt of SparseTensor, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = sqrt(x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.sqrt(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[nan, 1. ])
    )r   Úsparse_sqrtr   s     r   ÚsqrtrT   Ö  r   r   c                 ó,   — t        j                  | «      S )a–  
    Calculate the natural log of (1+x), requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = ln(1+x)

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2, 0, 1], dtype='float32')
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.log1p(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[nan       , 0.69314718])
    )r   Úsparse_log1pr   s     r   Úlog1prW   ÷  rH   r   c                 óô   — |r/t        |t        j                  j                  «      st	        |«      }|r/t        |t        j                  j                  «      st	        |«      }t        j                  | ||«      S )a  
    cast non-zero-index of SparseTensor to `index_dtype`, non-zero-element of SparseTensor to
    `value_dtype` , requiring x to be a SparseCooTensor or SparseCsrTensor.

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        index_dtype (np.dtype|str, optional): Data type of the index of SparseCooTensor,
            or crows/cols of SparseCsrTensor. Can be uint8, int8, int16, int32, int64.
        value_dtype (np.dtype|str, optional): Data type of the value of SparseCooTensor,
            SparseCsrTensor. Can be bool, float16, float32, float64, int8, int32, int64, uint8.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2, 0, 1])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.cast(sparse_x, 'int32', 'float64')
            >>> out
            Tensor(shape=[3], dtype=paddle.float64, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[-2.,  1.])
    )Ú
isinstancer   ÚVarDescÚVarTyper   r   Úsparse_cast)r   Úindex_dtypeÚvalue_dtyper   s       r   Úcastr_     sY   € ñ> œ: k´4·<±<×3GÑ3GÔHÜ0°Ó=ˆÙœ: k´4·<±<×3GÑ3GÔHÜ0°Ó=ˆÜ×Ñ˜a ¨kÓ:Ð:r   c                 ó@   — t        j                  | t        |«      «      S )a±  
    Calculate elementwise pow of x, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = x^{factor}

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        factor (float|int): factor of pow.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2, 0, 3], dtype='float32')
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.pow(sparse_x, 2)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[4., 9.])
    )r   Ú
sparse_powÚfloat)r   Úfactorr   s      r   Úpowrd   >  s   € ô> ×Ñ˜Q¤ f£Ó.Ð.r   c                 ó2   — t        j                  | ddd«      S )a‚  
    Calculate elementwise negative of x, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = -x

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2, 0, 3], dtype='float32')
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.neg(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[ 2., -3.])
    g      ð¿ç        T)r   Úsparse_scaler   s     r   Únegrh   `  s   € ô< ×Ñ˜q $¨¨TÓ2Ð2r   c                 ó,   — t        j                  | «      S )a‡  
    Calculate elementwise absolute value of x, requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = |x|

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2, 0, 3], dtype='float32')
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.abs(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[2., 3.])
    )r   Ú
sparse_absr   s     r   Úabsrk   �  r   r   c                 ó,   — t        j                  | «      S )aî  
    the coalesced operator include sorted and merge, after coalesced, the indices of x is sorted and unique.

    Parameters:
        x (Tensor): the input SparseCooTensor.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        Tensor: return the SparseCooTensor after coalesced.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> indices = [[0, 0, 1], [1, 1, 2]]
            >>> values = [1.0, 2.0, 3.0]
            >>> sp_x = paddle.sparse.sparse_coo_tensor(indices, values)
            >>> sp_x = paddle.sparse.coalesce(sp_x)
            >>> print(sp_x.indices())
            Tensor(shape=[2, 2], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[0, 1],
             [1, 2]])
            >>> print(sp_x.values())
            Tensor(shape=[2], dtype=float32, place=Place(cpu), stop_gradient=True,
            [3., 3.])
    )r   Úsparse_coalescer   s     r   Úcoalescern   ¢  s   € ô< ×!Ñ! !Ó$Ð$r   c                 óê   — | j                   t        v r9t        j                  | dt        j
                  j                  j                  «      } t        j                  | dt        j                  z  dd«      S )aÏ  
    Convert each of the elements of input x from radian to degree,
    requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        rad2deg(x) = 180/ \pi * x

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64, int32, int64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([3.142, 0., -3.142])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.rad2deg(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[ 180.02334595, -180.02334595])
    Nç     €f@rf   T©r"   Ú_int_dtype_r   r\   r   rZ   r[   ÚFP32rg   ÚnpÚpir   s     r   Úrad2degrv   Ã  sS   € ð> 	‡w�w”+ÑÜ×Ñ˜q $¬¯©×(<Ñ(<×(AÑ(AÓBˆÜ×Ñ˜q %¬"¯%©%¡-°°dÓ;Ð;r   c                 óê   — | j                   t        v r9t        j                  | dt        j
                  j                  j                  «      } t        j                  | t        j                  dz  dd«      S )aÇ  
    Convert each of the elements of input x from degree to radian,
    requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        deg2rad(x) = \pi * x / 180

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64, int32, int64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-180, 0, 180])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.deg2rad(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[-3.14159274,  3.14159274])
    Nrp   rf   Trq   r   s     r   Údeg2radrx   ç  sS   € ð> 	‡w�w”+ÑÜ×Ñ˜q $¬¯©×(<Ñ(<×(AÑ(AÓBˆÜ×Ñ˜q¤"§%¡%¨%¡-°°dÓ;Ð;r   c                 ó,   — t        j                  | «      S )aŒ  
    Calculate elementwise `exp(x)-1` , requiring x to be a SparseCooTensor or SparseCsrTensor.

    .. math::

        out = exp(x) - 1

    Parameters:
        x (Tensor): The input Sparse Tensor with data type float32, float64.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same data type and shape as ``x`` .

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> dense_x = paddle.to_tensor([-2., 0., 1.])
            >>> sparse_x = dense_x.to_sparse_coo(1)
            >>> out = paddle.sparse.expm1(sparse_x)
            >>> out
            Tensor(shape=[3], dtype=paddle.float32, place=Place(cpu), stop_gradient=True,
                indices=[[0, 2]],
                values=[-0.86466473,  1.71828187])
    )r   Úsparse_expm1r   s     r   Úexpm1r{     rH   r   c                 ó   — t        «       rt        j                  | |«      S t        | dg d¢d«       t	        |dt
        t        fd«       d| i}d|i}t        d«      }|j                  | j                  «      }|j                  d|d|i|¬«       |S )aþ
  
    Changes the shape of ``x`` without changing its value, requiring x to be a SparseCooTensor or SparseCsrTensor.
    Currently this function can only reshape the sparse dims of ``x`` , but ``shape`` argument must be specified
    as the shape of the reshaped tensor.

    Note that if x is a SparseCsrTensor, then len(shape) must be 2 or 3.

    There are some tricks when specifying the target shape.

        - 1. -1 means the value of this dimension is inferred from the total element number of x and remaining dimensions. Thus one and only one dimension can be set -1.

        - 2. 0 means the actual dimension value is going to be copied from the corresponding dimension of x. The indices of 0 in the target shape can not exceed the rank of x.

    Here are some examples to explain it.

        - 1. Given a 3-D tensor x with a shape [2, 4, 6], and the target shape is [6, 8], the reshape operator will transform x into a 2-D tensor with shape [6, 8] and leaving x's data unchanged.

        - 2. Given a 3-D tensor x with a shape [2, 4, 6], and the target shape is [2, 3, -1, 2], the reshape operator will transform x into a 4-D tensor with shape [2, 3, 4, 2] and leaving x's data unchanged. In this case, one dimension of the target shape is set to -1, the value of this dimension is inferred from the total element number of x and remaining dimensions.

        - 3. Given a 3-D tensor x with a shape [2, 4, 6], and the target shape is [-1, 0, 3, 2], the reshape operator will transform x into a 4-D tensor with shape [2, 4, 3, 2] and leaving x's data unchanged. In this case, besides -1, 0 means the actual dimension value is going to be copied from the corresponding dimension of x.

    Args:
        x (Tensor): The input sparse tensor with data type ``float32``, ``float64``, ``int32``, ``int64`` or ``bool``.
        shape (list|tuple): Define the target shape. At most one dimension of the target shape can be -1.
                        The data type is ``int32``.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        Tensor: A reshaped Tensor with the same data type as ``x``.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> x_shape = [6, 2, 3]
            >>> new_shape = [1, 0, 2, -1, 3]
            >>> format = "coo"

            >>> dense_x = paddle.randint(-100, 100, x_shape) * paddle.randint(0, 2, x_shape)

            >>> if format == "coo":
            ...     sp_x = dense_x.to_sparse_coo(len(x_shape))
            >>> else:
            ...     sp_x = dense_x.to_sparse_csr()
            >>> sp_out = paddle.sparse.reshape(sp_x, new_shape)

            >>> print(sp_out.shape)
            [1, 2, 2, 3, 3]

    r   )Úfloat16r(   r)   r*   r+   r,   r'   Úuint16ÚreshapeÚshapeÚsparse_reshaper/   r0   )r   r   r�   r   r   r7   r8   r   r9   r"   r:   )r   r€   r   r2   r4   r=   r/   s          r   r   r   ,  s¦   € ôj ÔÜ×$Ñ$ Q¨Ó.Ð.ä ØØò	ð ô	
ô 	�5˜'¤D¬% =°)Ô<à�q�ˆØ˜%Ð ˆäÐ-Ó.ˆØ×>Ñ>¸q¿w¹wÓGˆØ×ÑØ!ØØ˜C�LØð	 	ô 	
ð ˆ
r   c                 óÆ   — t        «       rt        j                  | «      S d}t        |«      }|j	                  | j
                  «      }|j                  |d| id|ii ¬«       |S )aŽ  

    Return whether every element of input tensor is `NaN` or not, requiring x to be a SparseCooTensor or SparseCsrTensor.

    Args:
        x (Tensor): The input tensor (SparseCooTensor or SparseCsrTensor), it's data type should be float16, float32, float64, int32, int64.
        name (str, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        A Sparse Tensor with the same shape as ``x``,  the bool result which shows every element of `x` whether it is `NaN` or not.

    Examples:
        .. code-block:: python

            >>> import paddle
            >>> import numpy as np

            >>> format = "coo"
            >>> np_x = np.asarray([[[0., 0], [1., 2.]], [[0., 0], [3., float('nan')]]])
            >>> dense_x = paddle.to_tensor(np_x)

            >>> if format == "coo":
            ...     sparse_x = dense_x.to_sparse_coo(len(np_x.shape))
            >>> else:
            ...     sparse_x = dense_x.to_sparse_csr()
            ...
            >>> sparse_out = paddle.sparse.isnan(sparse_x)
            >>> print(sparse_out)
            Tensor(shape=[2, 2, 2], dtype=paddle.bool, place=Place(gpu:0), stop_gradient=True,
                   indices=[[0, 0, 1, 1],
                            [1, 1, 1, 1],
                            [0, 1, 0, 1]],
                   values=[False, False, False, True ])

    Úsparse_isnanr   r/   r0   )r   r   rƒ   r   r9   r"   r:   )r   r   r<   r=   r/   s        r   Úisnanr„   ƒ  sj   € ôH ÔÜ×"Ñ" 1Ó%Ð%à ˆÜ˜WÓ%ˆØ×>Ñ>¸q¿w¹wÓGˆØ×ÑØ # q °E¸3°<Àrð 	ô 	
ð ˆ
r   c                 óŠ  — t        «       rt        j                  | |||«      S |||dœ}t        | dg d¢d«       t	        |dt
        t        fd«       t	        |dt
        t        fd«       t	        |dt
        t        fd«       d}t        |«      }|j                  | j                  ¬«      }|j                  |d| id	|i|¬
«       |S )a  
    This operator produces a slice of ``x`` along multiple axes for sparse tensors.
    Slice uses ``axes``, ``starts`` and ``ends`` attributes to specify the start and
    end dimension for each axis in the list of axes and Slice uses this information
    to slice the input sparse tensor (x). If a negative value is passed to
    ``starts`` or ``ends`` such as :math:`-i`, it represents the reverse position of
    the axis :math:`i-1` (here 0 is the initial position).
    If the value passed to ``starts`` or ``ends`` is greater than the number of elements
    in the dimenstion (n), it represents n.
    For slicing to the end of a dimension with unknown size, it is recommended to pass
    in INT_MAX. The size of ``axes`` must be equal to ``starts`` and ``ends``.

    Args:
        x (Tensor): The input Tensor (``SparseCooTensor`` or ``SparseCsrTensor``), it's data type should be ``float16``, ``float32``, ``float64``, ``int32``, ``int64``.
        axes (list|tuple|Tensor): The data type is ``int32``.If ``axes`` is a list or tuple, the elements of
                it should be integers or Tensors with shape [1]. If ``axes`` is a Tensor, it should be a 1-D Tensor.
                Axes that `starts` and `ends` apply to.
        starts (list|tuple|Tensor): The data type is ``int32``. If ``starts`` is a list or tuple, the elements of
                it should be integers or Tensors with shape [1]. If ``starts`` is a Tensor, it should be a 1-D Tensor.
                It represents starting indices of corresponding axis in ``axes``.
        ends (list|tuple|Tensor): The data type is ``int32``. If ``ends`` is a list or tuple, the elements of
                it should be integers or Tensors with shape [1]. If ``ends`` is a Tensor, it should be a 1-D Tensor.
                It represents ending indices of corresponding axis in ``axes``.

    Returns:
        A Sparse Tensor. The data type is same as ``x``.

    Examples:
        .. code-block:: python

            >>> import paddle
            >>> import numpy as np

            >>> format = 'coo'
            >>> np_x = np.asarray([[4, 0, 7, 0], [0, 0, 5, 0], [-4, 2, 0, 0]])
            >>> dense_x = paddle.to_tensor(np_x)
            >>> if format == 'coo':
            ...     sp_x = dense_x.to_sparse_coo(len(np_x.shape))
            >>> else:
            ...     sp_x = dense_x.to_sparse_csr()
            ...
            >>> axes = [0, 1]
            >>> starts = [1, 0]
            >>> ends = [3, -2]
            >>> sp_out = paddle.sparse.slice(sp_x, axes, starts, ends)
            >>> # sp_out is x[1:3, 0:-2]

            >>> print(sp_out)
            Tensor(shape=[2, 2], dtype=paddle.int64, place=Place(cpu), stop_gradient=True,
                   indices=[[1, 1],
                            [0, 1]],
                   values=[-4,  2])

    )ÚaxesÚstartsÚendsr   r&   Úsparse_slicer†   r‡   rˆ   r.   r/   r0   )r   r   r‰   r   r   r7   r8   r   r9   r"   r:   )	r   r†   r‡   rˆ   r   r4   r<   r=   r/   s	            r   ÚslicerŠ   ³  sÏ   € ôn ÔÜ×"Ñ" 1 d¨F°DÓ9Ð9à¨¸Ñ>ˆÜ ØØòð ô	
ô 	�4˜¤$¬ °Ô?Ü�6˜8¤d¬E ]°NÔCÜ�4˜¤$¬ °Ô?Ø ˆÜ˜WÓ%ˆØ×>Ñ>ÀQÇWÁWÐ>ÓMˆØ×ÑØ # q °E¸3°<Àuð 	ô 	
ð ˆ
r   c           	      óh  ‡‡‡‡— d„ }d„ Šd„ Šˆˆfd„Šdˆˆˆfd„	Šdˆˆˆˆfd	„	}t        j                  | «      st        d
t        | «      › �«      ‚| j	                  «       st        d«      ‚t         j
                  j                  «       }|�%|dk(  s t        |j                  d«      d   «      dk  rt        d«      ‚| j                  dd \  }}	|€t        d||	«      }n/|dk\  r|t        ||	«      k  st        d|› dt        ||	«      › �«      ‚|dk\  st        d|› d�«      ‚ || «      }
|s || ||d¬«      S t        | j                  «      dk7  rt        d«      ‚t         j                  j                  | d¬«      }|j                  «       |z  }t         j                  j                  |j!                  «       ||j"                  |j$                  ¬«      }|j!                  «       d   }t        j&                  dt        |«      f|j"                  ¬«      }||d<   t         j                  j                  ||j                  «       |	df|
| j$                  ¬«      }t        j(                  | j                  dd d|gz   |
¬«      } ‰t        j*                  |j-                  «       |«      «      } || |||¬«      S )a  
    Performs linear Principal Component Analysis (PCA) on a sparse matrix.

    Let :math:`X` be the input matrix or a batch of input matrices, the output should satisfies:

    .. math::
        X = U * diag(S) * V^{T}

    Args:
        x (Tensor): The input tensor. Its shape should be `[N, M]`,
            N and M can be arbitraty positive number.
            The data type of x should be float32 or float64.
        q (int, optional): a slightly overestimated rank of :math:`X`.
            Default value is :math:`q=min(6,N,M)`.
        center (bool, optional): if True, center the input tensor.
            Default value is True.
        name (str, optional): Name for the operation (optional, default is None).
            For more information, please refer to :ref:`api_guide_Name`.

    Returns:
        - Tensor U, is N x q matrix.
        - Tensor S, is a vector with length q.
        - Tensor V, is M x q matrix.

        tuple (U, S, V): which is the nearly optimal approximation of a singular value decomposition of a centered matrix :math:`X`.

    Examples:
        .. code-block:: python

            >>> # doctest: +REQUIRES(env:GPU)
            >>> import paddle
            >>> paddle.device.set_device('gpu')

            >>> format = "coo"
            >>> paddle.seed(2023)
            >>> dense_x = paddle.randn((5, 5), dtype='float64')

            >>> if format == "coo":
            ...     sparse_x = dense_x.to_sparse_coo(len(dense_x.shape))
            >>> else:
            ...     sparse_x = dense_x.to_sparse_csr()

            >>> print("sparse.pca_lowrank API only support CUDA 11.x")
            >>> # U, S, V = None, None, None
            >>> # use code blow when your device CUDA version >= 11.0
            >>> U, S, V = paddle.sparse.pca_lowrank(sparse_x)

            >>> print(U)
            Tensor(shape=[5, 5], dtype=float64, place=Place(gpu:0), stop_gradient=True,
                   [[-0.31412600,  0.44814876,  0.18390454, -0.19967630, -0.79170452],
                    [-0.31412600,  0.44814876,  0.18390454, -0.58579808,  0.56877700],
                    [-0.31412600,  0.44814876,  0.18390454,  0.78547437,  0.22292751],
                    [-0.38082462,  0.10982129, -0.91810233,  0.00000000,  0.00000000],
                    [ 0.74762770,  0.62082796, -0.23585052,  0.00000000, -0.00000000]])

            >>> print(S)
            Tensor(shape=[5], dtype=float64, place=Place(gpu:0), stop_gradient=True,
                   [1.56031096, 1.12956227, 0.27922715, 0.00000000, 0.00000000])

            >>> print(V)
            Tensor(shape=[5, 5], dtype=float64, place=Place(gpu:0), stop_gradient=True,
                   [[ 0.88568469, -0.29081908,  0.06163676,  0.19597228, -0.29796422],
                    [-0.26169364, -0.27616183,  0.43148760, -0.42522796, -0.69874939],
                    [ 0.28587685,  0.30695344, -0.47790836, -0.76982533, -0.05501437],
                    [-0.23958121, -0.62770647, -0.71141770,  0.11463224, -0.17125926],
                    [ 0.08918713, -0.59238761,  0.27478686, -0.41833534,  0.62498824]])
    c                 ó    — | j                   }|t        j                  t        j                  t        j                  fv r|S t        j                  S ©N)r"   Úpaddler}   r(   r)   )r   r"   s     r   Úget_floating_dtypez'pca_lowrank.<locals>.get_floating_dtypeL  s5   € Ø—‘ˆØ”V—^‘^¤V§^¡^´V·^±^ÐDÑDØˆLÜ�~‰~Ðr   c                 óF   — | j                  «       r| j                  «       S | S r�   )Ú
is_complexÚconj)r   s    r   Ú	conjugatezpca_lowrank.<locals>.conjugateR  s   € Ø�<‰<Œ>Ø—6‘6“8ˆOØˆr   c                 ó  — | j                   }t        t        dt        |«      «      «      }|d d |d   gz   |d   gz   }| j	                  «       r t
        j                  j                  | |«      S t        j                  | |«      S )Nr   éþÿÿÿéÿÿÿÿ)r€   r7   ÚrangeÚlenÚ	is_sparserŽ   Úsparser   )r   r€   r   s      r   r   zpca_lowrank.<locals>.transposeW  st   € Ø—‘ˆÜ”E˜!œS ›ZÓ(Ó)ˆØ�C�Rˆy˜D ™H˜:Ñ%¨¨b©¨
Ñ2ˆØ�;‰;Œ=Ü—=‘=×*Ñ*¨1¨dÓ3Ð3Ü×Ñ  4Ó(Ð(r   c                 ó    •—  ‰ ‰| «      «      S r�   © )r   r“   r   s    €€r   Útransjugatez pca_lowrank.<locals>.transjugate_  s   ø€ Ù™ 1›Ó&Ð&r   é   Nc                 ó   •— |€dn|}| j                   dd  \  }}t        j                  j                  }t        j                  ||f| j
                  ¬«      } ‰| «      } ‰|«      }	|€� |t        j                  j                  | |«      «      d   }
t        |«      D ]T  } |t        j                  j                  |	|
«      «      d   }
 |t        j                  j                  | |
«      «      d   }
ŒV |
S  ‰|«      } |t        j                  j                  | |«      t        j                  ||«      z
  «      d   }
t        |«      D ]‚  } |t        j                  j                  |	|
«      t        j                  ||
«      z
  «      d   }
 |t        j                  j                  | |
«      t        j                  ||
«      z
  «      d   }
Œ„ |
S )Nrž   r•   r.   r   )	r€   rŽ   ÚlinalgÚqrÚrandnr"   rš   Úmatmulr—   )r   ÚqÚniterÚMÚmÚnr¡   ÚRÚA_tÚA_HÚQÚiÚM_Hr“   r�   r   s                €€€r   Úget_approximate_basisz*pca_lowrank.<locals>.get_approximate_basisb  s„  ø€ Ø�]‘¨ˆØ�w‰w�r�sˆ|‰ˆˆ1Ü�]‰]×Ñˆä�L‰L˜!˜Q˜ q§w¡wÔ/ˆá˜‹lˆÙ˜‹nˆØˆ9Ù”6—=‘=×'Ñ'¨¨1Ó-Ó.¨qÑ1ˆAÜ˜5–\�Ù”v—}‘}×+Ñ+¨C°Ó3Ó4°QÑ7�Ù”v—}‘}×+Ñ+¨A¨qÓ1Ó2°1Ñ5‘ð "ð ˆñ ˜a“.ˆCÙ”6—=‘=×'Ñ'¨¨1Ó-´·±¸aÀÓ0CÑCÓDÀQÑGˆAÜ˜5–\�Ù”v—}‘}×+Ñ+¨C°Ó3´f·m±mÀCÈÓ6KÑKÓLÈQÑO�Ù”v—}‘}×+Ñ+¨A¨qÓ1´F·M±MÀ!ÀQÓ4GÑGÓHÈÑK‘ð "ð ˆr   é   c                 ó*  •— |€dn|}| j                   dd  \  }}|€d }n ‰|«      } ‰| «      }||k  s||kD  �r( ‰||||¬«      } ‰|«      }	|€!t        j                  j                  | |	«      }
n7t        j                  j                  | |	«      t        j                  ||	«      z
  }
|
j                   d   |k(  sJ |
j                   |f«       ‚|
j                   d   |k(  sJ |
j                   |f«       ‚|
j                   d   |
j                   d   k  sJ |
j                   «       ‚t        j                  j                  |
d¬«      \  }}} ‰|«      }|j                  |«      }�n. ‰| |||¬«      } ‰|«      }	|€!t        j                  j                  ||	«      }n7t        j                  j                  ||	«      t        j                  ||	«      z
  } ‰|«      }
|
j                   d   |k(  sJ |
j                   |f«       ‚|
j                   d   |k(  sJ |
j                   |f«       ‚|
j                   d   |
j                   d   k  sJ |
j                   «       ‚t        j                  j                  |
d¬«      \  }}} ‰|«      }|j                  |«      }|||fS )Nr°   r•   ©r¥   r¦   r–   F)Úfull_matrices)r€   rŽ   rš   r£   r    Úsvd)r   r¤   r¥   r¦   r§   r¨   ÚM_trª   r¬   ÚQ_cÚB_tÚUÚSÚVhÚVÚBr“   r¯   r�   r   s                   €€€€r   Úsvd_lowrankz pca_lowrank.<locals>.svd_lowranky  sV  ø€ Ø�‰A ˆØ�w‰w�r�sˆ|‰ˆˆ1Øˆ9Ø‰Cá˜A“,ˆCÙ˜‹lˆàˆqŠ5�A˜“EÙ% c¨1°E¸SÔAˆAÙ˜A“,ˆCØˆyÜ—m‘m×*Ñ*¨1¨cÓ2‘ä—m‘m×*Ñ*¨1¨cÓ2´V·]±]À1ÀcÓ5JÑJ�Ø—9‘9˜R‘= AÒ%Ð5¨¯	©	°1 ~Ó5Ð%Ø—9‘9˜R‘= AÒ%Ð5¨¯	©	°1 ~Ó5Ð%Ø—9‘9˜R‘= C§I¡I¨b¡MÒ1Ð<°3·9±9Ó<Ð1Ü—}‘}×(Ñ(¨¸EÐ(ÓB‰HˆAˆq�"Ù˜B“ˆAØ—‘˜“ŠAá% a¨°%¸1Ô=ˆAÙ˜A“,ˆCØˆyÜ—M‘M×(Ñ(¨¨cÓ2‘ä—M‘M×(Ñ(¨¨cÓ2´V·]±]À3ÈÓ5LÑL�Ù˜A“,ˆCØ—9‘9˜R‘= AÒ%Ð5¨¯	©	°1 ~Ó5Ð%Ø—9‘9˜R‘= AÒ%Ð5¨¯	©	°1 ~Ó5Ð%Ø—9‘9˜R‘= C§I¡I¨b¡MÒ1Ð<°3·9±9Ó<Ð1Ü—}‘}×(Ñ(¨¸EÐ(ÓB‰HˆAˆq�"Ù˜B“ˆAØ—‘˜“ˆAà�!�Qˆwˆr   zInput must be tensor, but got z#Input must be sparse, but got denseÚFalseÚ.r   é   z-sparse.pca_lowrank API only support CUDA 11.xr•   zq(=z>) must be non-negative integer and not greater than min(m, n)=zniter(=z) must be non-negative integerr²   z,input is expected to be 2-dimensional tensor)r!   )r"   Úplacer.   é   )rž   N)r°   rž   N)rŽ   Ú	is_tensorÚ
ValueErrorr1   r™   ÚversionÚcudar6   Úsplitr€   Úminr˜   rš   r>   ÚvaluesÚsparse_coo_tensorÚindicesr"   rÁ   ÚzerosÚonesr£   Úto_dense)r   r¤   Úcenterr¥   r   r�   r½   Úcuda_versionr§   r¨   r"   Ús_sumÚs_valÚcÚcolumn_indicesrË   ÚC_tÚ	ones_m1_tr¦   r“   r¯   r�   r   s                      @@@@r   Úpca_lowrankr×     s~  û€ òJòò
)õ'÷÷.%ð %ôN ×Ñ˜AÔÜÐ9¼$¸q»'¸ÐCÓDÐDà�;‰;Œ=ÜÐ>Ó?Ð?ä—>‘>×&Ñ&Ó(€LàÐØ˜7Ò"Üˆ|×!Ñ! #Ó& qÑ)Ó*¨RÒ/äÐHÓIÐIà�W‰W�R�Sˆ\�F€Qˆà€yÜ��1�a‹L‰Ø�1Šf˜œc ! Q›išÜØ�!�ð /Ü/2°1°a«y¨kð;ó
ð 	
ð �QŠJÜ˜7 5 'Ð)GÐHÓIÐIá˜qÓ!€EáÙ˜1˜a u°Ô5Ð5ä
ˆ1�7‰7ƒ|�qÒÜÐGÓHÐHô �M‰M×Ñ˜a bÐÓ)€EØ�L‰L‹N˜QÑ€EÜ�‰×'Ñ'Ø�‰‹˜ e§k¡k¸¿¹ð 	(ó 	€Að —Y‘Y“[ ‘^€NÜ�l‰l˜Aœs >Ó2Ð3¸>×;OÑ;OÔP€GØ€GˆA�JÜ
�-‰-×
)Ñ
)Ø�—‘“˜a ˜V¨5¸¿¹ð *ó €Cô —‘˜AŸG™G C R˜L¨A¨q¨6Ñ1¸Ô?€IÙ”&—-‘- §¡£°	Ó:Ó;€AÙ�q˜! 5¨AÔ.Ð.r   r�   )NNFN)NNN)NTrž   N)3Únumpyrt   rŽ   r   r   Úpaddle.base.data_feederr   r   Úpaddle.base.frameworkr   r   r	   Úpaddle.common_ops_importr
   Úpaddle.frameworkr   Ú__all__rZ   r[   ÚUINT8ÚINT8ÚINT16ÚINT32ÚINT64ÚBOOLrr   r   r   r   r   r>   rA   rD   rG   rK   rN   rQ   rT   rW   r_   rd   rh   rk   rn   rv   rx   r{   r   r„   rŠ   r×   rœ   r   r   Ú<module>rä      sd  ðó ã ß *ß Hß PÑ PÝ -Ý (à
€ð 	‡L�L×Ñ×ÑØ‡L�L×Ñ×ÑØ‡L�L×Ñ×ÑØ‡L�L×Ñ×ÑØ‡L�L×Ñ×ÑØ‡L�L×Ñ×Ñð€ð ò ó ð ð@ ò ó ð ð@ ò!ó ð!ð@ ò,ó ð,óDcðL ò!ó ð!ð@ ò!ó ð!ð@ ò"ó ð"ð@ ò"ó ð"ð@ ò!ó ð!ð@ ò#ó ð#ð@ ò!ó ð!ð@ ò"ó ð"ð@ ò";ó ð";ðJ ò/ó ð/ðB ò3ó ð3ð@ ò ó ð ð@ ò%ó ð%ð@ ò <ó ð <ðF ò <ó ð <ðF ò"ó ð"ó@Tón-ó`QôhJ/r   