o
    0 i`                     @   s   d dl mZ d dlmZ ejZejdddddZejZejZej	Z	ejdd	d
ddZ
ejdddddZd$ddZdd Zdd ZejZejZejZejZejZejZejZejdddddZejdddddZejdd d!d"dZejZd#S )%    )_core)fusionZcupy_reciprocal)bBhHiIlLqQ)eout0 = 1 / in0)fr   )dr   )Fout0 = in0_type(1) / in0)Dr   zout0 = in0 == 0 ? 0 : (1 / in0)zPComputes ``1 / x`` elementwise.

    .. seealso:: :data:`numpy.reciprocal`

    )docZ	cupy_real)?->?b->bB->Bh->hH->Hi->iI->Il->lL->Lq->qQ->Qe->ef->fd->d)F->fout0 = in0.real())D->dr%   z
out0 = in0^Returns the real part of the elements of the array.

    .. seealso:: :func:`numpy.real`

    Z	cupy_imag)r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   )r$   out0 = in0.imag())r&   r(   zout0 = 0cReturns the imaginary part of the elements of the array.

    .. seealso:: :func:`numpy.imag`

    Fc                 C   s   |rt | S t | S )zVReturns the angle of the complex argument.

    .. seealso:: :func:`numpy.angle`

    )r   Z	angle_degangle)zdeg r-   a/home/app/PaddleOCR-VL-test/.venv_paddleocr/lib/python3.10/site-packages/cupy/_math/arithmetic.pyr*   A   s   

r*   c                 C   0   t  r
t t| S t| tjst| } | jS )r'   )	r   
_is_fusing_call_ufunc_real_ufunc
isinstancer   ndarrayarrayrealvalr-   r-   r.   r6   L   
   
r6   c                 C   r/   )r)   )	r   r0   r1   _imag_ufuncr3   r   r4   r5   imagr7   r-   r-   r.   r;   Y   r9   r;   Zcupy_float_power)dd->dzFF->D)zDD->Dz6out0 = in1 == in1_type(0) ? in1_type(1): pow(in0, in1)zout0 = pow(in0, in1)zxFirst array elements raised to powers from second array, element-wise.

    .. seealso:: :data:`numpy.float_power`

    Z	cupy_fmod)zbb->bzBB->Bzhh->hzHH->Hzii->izII->Izll->lzLL->Lzqq->qzQQ->Q)zee->eout0 = fmodf(in0, in1))zff->fr=   )r<   zout0 = fmod(in0, in1)z4out0 = in1 == 0 ? 0 : fmod((double)in0, (double)in1)z\Computes the remainder of C division elementwise.

    .. seealso:: :data:`numpy.fmod`

    Z	cupy_modf)ze->eezf->ff)zd->ddz1double iptr; out0 = modf(in0, &iptr); out1 = iptrz1float iptr; out0 = modff(in0, &iptr); out1 = iptrzExtracts the fractional and integral parts of an array elementwise.

    This ufunc returns two arrays.

    .. seealso:: :data:`numpy.modf`

    N)F)Zcupyr   Z
cupy._corer   addZcreate_ufuncZ
reciprocalZpositivenegative	conjugater2   r:   r*   r6   r;   multiplydividedivmodpowersubtractZtrue_divideZfloor_divideZfloat_powerfmodmodf	remainderr-   r-   r-   r.   <module>   sj    

