
    
9j                    z   % S SK Jr  S SKrS SKrS SKJr  S SKJr  \R                  " SSS5      r\R                  " SS	S
5      r	SS jr
SS jrSS jrS r\R                  rS\S'   \R                   rS\S'   \R"                  rS\S'   \R$                  rS\S'   \R&                  rS\S'   \R(                  rS\S'   g)    )annotationsN)_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);
    }
    c                v   U R                   UR                   :w  a  [        R                  " S5      $ U(       d  X:H  R                  5       $ [        R
                  " U 5      [        R
                  " U5      pCX4:H  R                  5       (       d  [        R                  " S5      $ X)    X)    :H  R                  5       $ )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        P/home/wildlama/miniconda3/lib/python3.13/site-packages/cupy/_logic/comparison.pyarray_equalr   ,   s      
xx288zz%  ~~==$gmmB&75N!!zz%  vJ"V*$))++    c                4    [        XX#US9R                  5       $ )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   I   s    4 1dCGGIIr   c                F   [         R                  " U 5      n [         R                  " U5      nU R                  [        R                  [        R
                  4;   d.  UR                  [        R                  [        R
                  4;   a  [        XX#U5      $ [        XX#U5      $ )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   f   st    0 	AA	EOOU%5%566	EOOU%5%566 t9==t955r   c                     [         R                  " X5        X:H  R	                  5       $ ! [         a    [         R                  " S5      s $ f = f)aq  
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)      sD    $!r H>>  !zz%  !s   *  AAz_core.ufuncgreatergreater_equalless
less_equalequal	not_equal)F)gh㈵>g:0yE>F)
__future__r   r!   r
   r   cupy._logicr   create_ufuncr%   r$   r   r   r   r)   r*   __annotations__r+   r,   r-   r.   r/    r   r   <module>r5      s    "     (		$ &&	  ,:J:6B4 }} $ #00{ 0 JJk   **
K * [[{   	; (r   