
    `i                        d dl Z d dlmZ d dlmZ d dlmZ ddZddZddZ	 ej
        dd	d
d          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        dddd          ZdS )    N)_core)fusion)ufuncc                     t          j                    r't          j        t          j        j        | ||          S t          j        | d          } |                     ||          S )a  Rounds to the given number of decimals.

    Args:
        a (cupy.ndarray): The source array.
        decimals (int): Number of decimal places to round to (default: 0).
            If decimals is negative, it specifies the number of positions to
            the left of the decimal point.
        out (cupy.ndarray): Output array.

    Returns:
        cupy.ndarray: Rounded array.

    .. seealso:: :func:`numpy.around`

    outF)copy)r   
_is_fusing_call_ufuncr   core_round_ufuncarrayroundadecimalsr   s      g/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/cupy/_math/rounding.pyaroundr      sg       ;!J#Qc; ; ; 	;AE"""A7787%%%    c                 &    t          | ||          S )Nr   )r   r   s      r   r   r      s    !X3''''r   c                 Z    t          j        dt                     t          | ||          S )NzPlease use `round` instead.r   )warningswarnDeprecationWarningr   r   s      r   round_r   #   s+    M/1CDDD!X3''''r   rint   	cupy_rintzbRounds each element of an array to the nearest integer.

    .. seealso:: :data:`numpy.rint`

    floor
cupy_floorzaRounds each element of an array to its floor integer.

    .. seealso:: :data:`numpy.floor`

    F)support_complexceil	cupy_ceilzbRounds each element of an array to its ceiling integer.

    .. seealso:: :data:`numpy.ceil`

    trunc
cupy_trunczYRounds each element of an array towards zero.

    .. seealso:: :data:`numpy.trunc`

    cupy_fix)ze->ezf->fzd->dz+out0 = (in0 >= 0.0) ? floor(in0): ceil(in0)zxIf given value x is positive, it return floor(x).
    Else, it return ceil(x).

    .. seealso:: :func:`numpy.fix`

    )doc)r   N)r   cupyr   
cupy._corer   
cupy._mathr   r   r   r   create_math_ufuncr   r   r"   r$   create_ufuncfix r   r   <module>r/      sS                     & & & &.( ( ( (( ( ( (
 u
A{	 	 	 Q 	  	  	  u
A{       	 Q 	  	  	  e(1		 	 	r   