o
    i                     @   s   d dl Z d dlmZ d dlmZ d dlmZ dddZdddZdd	d
Z	e
ddddZej
ddddddZej
ddddddZej
ddddddZejdddddZdS )     N)_core)fusion)ufuncc                 C   s:   t  rt jtjj| ||dS tj| dd} | 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    r   P/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/cupy/_math/rounding.pyaround   s   r   c                 C   s   t | ||dS )Nr   )r   r   r   r   r   r      s   r   c                 C   s   t dt t| ||dS )NzPlease use `round` instead.r   )warningswarnDeprecationWarningr   r   r   r   r   round_#   s   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fixr   r   r   r   <module>   s>    


				
