
    ёiX.                       S SK Jr  S SKJr  S SKJrJrJrJrJ	r	J
r
JrJrJrJrJrJrJrJrJrJrJr  S SKJr  SSKJr  SSKJr  SSKJrJr  S	S
KJ r J!r!  \(       a  S SK"J#r#  / SQr$/ r%\!" S5      \&" 5       S'   \'" \$5       H$  r(\ " \(5      r)\*\)l+        \" \)5      r,\,\&" 5       \('   M&     SSS jjr-SSS jjr.SSS jjr/\SS j5       r0SSS jjr1SSS jjr2SSS jjr3g)    )annotations)TYPE_CHECKING)absacosacoshasinatanhceilcoscoshexpexpm1floorroundrsqrtsigmoidsinsinhsqrt)inplace_apis_in_dygraph_only   )_C_ops)check_variable_and_dtype)LayerHelperin_dynamic_or_pir_mode   )generate_inplace_fngenerate_layer_fn)Tensor)exp_sqrt_rsqrt_ceil_floor_reciprocal_sigmoid_abs_sin_sinh_asin_asinh_cos_cosh_acos_acosh_tan_atan_atanh_expm1_erf_square_scale_scaleNc                    [        5       (       a  [        R                  " U 5      $ [        U S/ SQS5        [	        S0 [        5       D6nUR                  U R                  S9nUR                  SSU 0SU0S9  U$ )	aG  
Asinh Activation Operator.

.. math::
   out = asinh(x)

Args:
    x (Tensor): Input of Asinh operator, an N-D Tensor, with data type float32, float64, float16, bfloat16,
        uint8, int8, int16, int32, int64, complex64 or complex128.
    name (str|None, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.

Returns:
    Tensor. Output of Asinh operator, a Tensor with shape same as input
        (integer types are autocasted into float32).

Examples:
    .. code-block:: python

        >>> import paddle

        >>> x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3])
        >>> out = paddle.asinh(x)
        >>> print(out)
        Tensor(shape=[4], dtype=float32, place=Place(cpu), stop_gradient=True,
        [-0.39003533, -0.19869010,  0.09983408,  0.29567307])
xfloat16uint16float32float64uint8int8int16int32int64	complex64
complex128asinhdtypeXOuttypeinputsoutputs)rF   )	r   r   rF   r   r   locals"create_variable_for_type_inferencerH   	append_opr9   namehelperouts       Q/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/paddle/tensor/ops.pyrF   rF   Z   s}    6 ||A  !	
$ 1177agg7FgsAhM
    c                    [        5       (       a  [        R                  " U 5      $ [        U S/ SQS5        [	        S0 [        5       D6nUR                  U R                  S9nUR                  SSU 0SU0S9  U$ )	a&  
Arctangent Operator.

.. math::
   out = tan^{-1}(x)

Args:
    x (Tensor): Input of Atan operator, an N-D Tensor, with data type float32, float64, float16, bfloat16,
        uint8, int8, int16, int32, int64, complex64 or complex128.
    name (str|None, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.

Returns:
    Tensor. Same shape and dtype as input x
        (integer types are autocasted into float32).

Examples:
    .. code-block:: python

        >>> import paddle

        >>> x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3])
        >>> out = paddle.atan(x)
        >>> print(out)
        Tensor(shape=[4], dtype=float32, place=Place(cpu), stop_gradient=True,
        [-0.38050640, -0.19739556,  0.09966865,  0.29145682])
r9   r:   atanrG   rI   rJ   rK   )rY   )	r   r   rY   r   r   rO   rP   rH   rQ   rR   s       rV   rY   rY      s}    6 {{1~  !	
$ 0vx077agg7Ffc1Xs|L
rW   c                    [        5       (       a  [        R                  " U 5      $ [        U S/ SQS5        [	        S0 [        5       D6nUR                  U R                  S9nUR                  SSU 0SU0S9  U$ )	aG  

Reciprocal Activation Operator.

.. math::
    out = \frac{1}{x}

Args:
    x (Tensor): Input of Reciprocal operator, an N-D Tensor, with data type float32, float64, float16, bfloat16,
        uint8, int8, int16, int32, int64.
    name (str|None, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.

Returns:
    Tensor. Output of Reciprocal operator, a Tensor with shape same as input
        (integer types are autocasted into float32).

Examples:
    .. code-block:: python

        >>> import paddle

        >>> x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3])
        >>> out = paddle.reciprocal(x)
        >>> print(out)
        Tensor(shape=[4], dtype=float32, place=Place(cpu), stop_gradient=True,
        [-2.50000000, -5.        ,  10.       ,  3.33333325])
r9   )	r;   r<   r=   r>   r?   r@   rA   rB   rC   
reciprocalrG   rI   rJ   rK   )r[   )	r   r   r[   r   r   rO   rP   rH   rQ   rR   s       rV   r[   r[      s    8   ## 
 	
  6VX677agg7FsAh 	 	
 
rW   c                .    [         R                  " X5      $ )z
Inplace version of ``round`` API, the output Tensor will be inplaced with input ``x``.
Please refer to :ref:`api_paddle_round`.
)r   round_)r9   decimalsrS   s      rV   r]   r]      s     ==%%rW   c                    [        5       (       a  [        R                  " U 5      $ [        U S/ SQS5        [	        S0 [        5       D6nUR                  U R                  S9nUR                  SSU 0SU0S9  U$ )	a  
Square each elements of the inputs.

.. math::
   out = x^2

Args:
    x (Tensor): Input of Square operator, an N-D Tensor, with data type int32, int64, float32, float64, float16, complex64 or complex128.
    name (str|None, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.

Returns:
    Tensor. Output of Square operator, a Tensor with shape same as input.

Examples:
    .. code-block:: python

        >>> import paddle

        >>> x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3])
        >>> out = paddle.square(x)
        >>> print(out)
        Tensor(shape=[4], dtype=float32, place=Place(cpu), stop_gradient=True,
        [0.16000001, 0.04000000, 0.01000000, 0.09000000])
r9   )rB   rC   r;   r=   r>   rD   rE   squarerG   rI   rJ   rK   )r`   )	r   r   r`   r   r   rO   rP   rH   rQ   rR   s       rV   r`   r`     s~    2 }}Q  	
 2277agg7FhQx%N
rW   c                    [        5       (       a  [        R                  " U 5      $ [        U S/ SQS5        [	        S0 [        5       D6nUR                  U R                  S9nUR                  SSU 0SU0S9  U$ )	a  
Tangent Operator. Computes tangent of x element-wise.

Input range is `(k*pi-pi/2, k*pi+pi/2)` and output range is `(-inf, inf)`.

.. math::
   out = tan(x)

Args:
    x (Tensor): Input of Tan operator, an N-D Tensor, with data type float32, float64, float16,
        bfloat16, uint8, int8, int16, int32, int64, complex64 or complex128.
    name (str|None, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`.

Returns:
    Tensor. Output of Tan operator, a Tensor with shape same as input
        (integer types are autocasted into float32).

Examples:
    .. code-block:: python

        >>> import paddle

        >>> x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3])
        >>> out = paddle.tan(x)
        >>> print(out)
        Tensor(shape=[4], dtype=float32, place=Place(cpu), stop_gradient=True,
        [-0.42279324, -0.20271003,  0.10033467,  0.30933627])
r9   r:   tanrG   rI   rJ   rK   )rb   )	r   r   rb   r   r   rO   rP   rH   rQ   rR   s       rV   rb   rb   6  s}    : zz!}  !	
$ /fh/77agg7FeS!HuclK
rW   c                    [        5       (       a  [        R                  " U 5      $ [        5       R	                  5       n0 nUR                  5        H  u  pUc  M
  XCU'   M     [        S5      " S0 UD6$ )a  
The error function.
For more details, see `Error function <https://en.wikipedia.org/wiki/Error_function>`_.

Equation:
    ..  math::
        out = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{- \eta^{2}}d\eta

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

Returns:
    Tensor. The output of Erf, dtype: float32 or float64 (integer types are autocasted into float32), shape: the same as the input.

Examples:

    .. code-block:: python

        >>> import paddle

        >>> x = paddle.to_tensor([-0.4, -0.2, 0.1, 0.3])
        >>> out = paddle.erf(x)
        >>> print(out)
        Tensor(shape=[4], dtype=float32, place=Place(cpu), stop_gradient=True,
        [-0.42839241, -0.22270259,  0.11246292,  0.32862678])
erf )r   r   rd   rO   copyitemsr   )r9   rS   
locals_varkwargsvals        rV   rd   rd   n  sc    8 zz!}JF%%'	?4L ( U#-f--rW   )N)r9   r   rS   z
str | Nonereturnr   )r   N)4
__future__r   typingr   paddle._C_opsr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   paddle.utils.inplace_utilsr    r   base.data_feederr   	frameworkr   r   layer_function_generatorr   r   paddler   __inplace_unary_func____all__globalsset_OPfunc__name__
__module___funcrF   rY   r[   r]   r`   rb   rd   re   rW   rV   <module>r~      s    #      & D  7 ;
  2 
 (0	( %&Cs#DDO(.EGIcN	 '3l3l4n & &-`5p$.rW   