
    `i                     b   U d dl Z d dlZd dlmZ d dlmZ  ej        ddd          Z ej        ddd	          ZddZddZ	ddZ
d Zej        Zej        ed<   ej        Zej        ed<   ej        Zej        ed<   ej        Zej        ed<   ej        Zej        ed<   ej        Zej        ed<   dS )    N)_core)contentcupy_is_close)zeeee?->?zffff?->?zdddd?->?a  
    bool equal_nan = in4;
    if (isfinite(in0) && isfinite(in1)) {
      out0 = fabs(in0 - in1) <= in3 + in2 * fabs(in1);
    } else if (equal_nan) {
      out0 = (in0 == in1) || (isnan(in0) && isnan(in1));
    } else {
      out0 = (in0 == in1);
    }
    cupy_is_close_complex)zFFff?->?zDDdd?->?a  
    bool equal_nan = in4;
    if (isfinite(in0) && isfinite(in1)) {
      out0 = abs(in0 - in1) <= in3 + in2 * abs(in1);
    } else if (equal_nan) {
      out0 = (in0 == in1) || (isnan(in0) && isnan(in1));
    } else {
      out0 = (in0 == in1);
    }
    Fc                 r   | j         |j         k    rt          j        d          S |s| |k                                    S t	          j        |           t	          j        |          }}||k                                    st          j        d          S | |          ||          k                                    S )a  Returns ``True`` if two arrays are element-wise exactly equal.

    Args:
        a1 (cupy.ndarray): Input array to compare.
        a2 (cupy.ndarray): Input array to compare.
        equal_nan (bool): If ``True``, NaN's in ``a1`` will be considered equal
            to NaN's in ``a2``.

    Returns:
        cupy.ndarray: A boolean 0-dim array.
        If its value is ``True``, two arrays are element-wise equal.

    .. seealso:: :func:`numpy.array_equal`

    F)shapecupyarrayallr   isnan)a1a2	equal_nana1nana2nans        j/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/cupy/_logic/comparison.pyarray_equalr   *   s      
x28z%     b~~=$$gmB&7&75EUN!! !z%   vJ"eV*$))+++    h㈵>:0yE>c                 N    t          | ||||                                          S )a  Returns True if two arrays are element-wise equal within a tolerance.

    Two values in ``a`` and ``b`` are  considiered equal when the following
    equation is satisfied.

    .. math::

       |a - b| \le \mathrm{atol} + \mathrm{rtol} |b|

    Args:
        a (cupy.ndarray): Input array to compare.
        b (cupy.ndarray): Input array to compare.
        rtol (float): The relative tolerance.
        atol (float): The absolute tolerance.
        equal_nan (bool): If ``True``, NaN's in ``a`` will be considered equal
            to NaN's in ``b``.

    Returns:
        cupy.ndarray: A boolean 0-dim array.
        If its value is ``True``, two arrays are element-wise equal within
        a tolerance.

    .. seealso:: :func:`numpy.allclose`

    )rtolatolr   )iscloser   abr   r   r   s        r   allcloser   G   s)    4 1adCCCGGIIIr   c                    t          j        |           } t          j        |          }| j        t          j        t          j        fv s|j        t          j        t          j        fv rt          | ||||          S t          | ||||          S )a  Returns a boolean array where two arrays are equal within a tolerance.

    Two values in ``a`` and ``b`` are  considiered equal when the following
    equation is satisfied.

    .. math::

       |a - b| \le \mathrm{atol} + \mathrm{rtol} |b|

    Args:
        a (cupy.ndarray): Input array to compare.
        b (cupy.ndarray): Input array to compare.
        rtol (float): The relative tolerance.
        atol (float): The absolute tolerance.
        equal_nan (bool): If ``True``, NaN's in ``a`` will be considered equal
            to NaN's in ``b``.

    Returns:
        cupy.ndarray: A boolean array storing where ``a`` and ``b`` are equal.

    .. seealso:: :func:`numpy.isclose`

    )r	   
asanyarraydtypenumpy	complex64
complex128_is_close_complex	_is_closer   s        r   r   r   d   s|    0 	AA	EOU%5666	EOU%5666 AtT9===AtT9555r   c                     	 t          j        | |           n$# t          $ r t          j        d          cY S w xY w| |k                                    S )a  
    Returns ``True`` if all elements are equal or shape consistent,
    i.e., one input array can be broadcasted to create the same
    shape as the other.

    Args:
        a1 (cupy.ndarray): Input array.
        a2 (cupy.ndarray): Input array.

    Returns:
        cupy.ndarray: A boolean 0-dim array.
            ``True`` if equivalent, otherwise ``False``.

    .. seealso:: :func:`numpy.array_equiv`

    F)r	   	broadcast	Exceptionr
   r   )r   r   s     r   array_equivr*      sc    $!r2 ! ! !z%     ! "H>>s    99greatergreater_equalless
less_equalequal	not_equal)F)r   r   F)r"   r	   r   cupy._logicr   create_ufuncr&   r%   r   r   r   r*   r+   ufunc__annotations__r,   r-   r.   r/   r0    r   r   <module>r6      s\                 E(	 	$ 'E&	   , , , ,:J J J J:6 6 6 6B  4 } $ $ $ #0u{ 0 0 0 Jek     *
EK * * * [u{       	5; ( ( ( ( (r   