o
    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)fusion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`

    )doc	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`

    	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   	angle_degangle)zdeg r1   R/home/ubuntu/veenaModal/venv/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valr1   r1   r2   r:   L   
   
r:   c                 C   r3   )r,   )	r   r4   r5   _imag_ufuncr7   r   r8   r9   imagr;   r1   r1   r2   r?   Y   r=   r?   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`

    	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->frC   )rA   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`

    	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)cupyr   
cupy._corer   addcreate_ufunc
reciprocalpositivenegative	conjugater6   r>   r.   r:   r?   multiplydividedivmodpowersubtracttrue_dividefloor_dividefloat_powerfmodmodf	remainderr1   r1   r1   r2   <module>   sj    

