Ë
    u™ãj¼  ã                   ó`   — d Z ddlZddlZddlZddlmZ ddl	m
Z
mZ d	d„Zd
d„Zddefd„Zd„ Zy)z)
Assertion helpers for arithmetic tests.
é    N)ÚBooleanArrayÚNumpyExtensionArrayc                 óØ   — t        j                  t        |¬«      5  | |z    ddd«       t        j                  t        |¬«      5  || z    ddd«       y# 1 sw Y   Œ3xY w# 1 sw Y   yxY w)a  
    Helper function to assert that two objects cannot be added.

    Parameters
    ----------
    left : object
        The first operand.
    right : object
        The second operand.
    msg : str, default "cannot add"
        The error message expected in the TypeError.
    ©ÚmatchN©ÚpytestÚraisesÚ	TypeError©ÚleftÚrightÚmsgs      úi/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/pandas/tests/arithmetic/common.pyÚassert_cannot_addr      s]   € ô 
�‰”y¨Ô	,ñ ØˆuŠ÷ä	�‰”y¨Ô	,ñ Ø�Š÷ð ÷ð ú÷ð ús   œAÁA ÁAÁ A)c                 ó¬  — t        j                  t        |¬«      5  | |z    ddd«       t        j                  t        |¬«      5  || z    ddd«       t        j                  t        |¬«      5  | |z
   ddd«       t        j                  t        |¬«      5  || z
   ddd«       y# 1 sw Y   Œ…xY w# 1 sw Y   ŒhxY w# 1 sw Y   ŒKxY w# 1 sw Y   yxY w)a1  
    Helper function to assert that two objects can
    neither be added nor subtracted.

    Parameters
    ----------
    left : object
        The first operand.
    right : object
        The second operand.
    msg : str or None, default None
        The error message expected in the TypeError.
    r   Nr   r   s      r   Úassert_invalid_addsub_typer   #   s±   € ô 
�‰”y¨Ô	,ñ ØˆuŠ÷ä	�‰”y¨Ô	,ñ Ø�Š÷ä	�‰”y¨Ô	,ñ ØˆuŠ÷ä	�‰”y¨Ô	,ñ Ø�Š÷ð ÷ð ú÷ð ú÷ð ú÷ð ús/   œB&ÁB2Á.B>ÂC
Â&B/Â2B;Â>CÃ
CÚis_cmpc                 óÞ  — t        | t        j                  «      st        |t        j                  «      rt        j                  S t        | t        j                  «      st        |t        j                  «      rt        j                  S t        | t        j                  «      st        |t        j                  «      r"|rt
        j                  S t        j                  S t        j                  S )zÛ
    Get the box to use for 'expected' in an arithmetic or comparison operation.

    Parameters
    left : Any
    right : Any
    is_cmp : bool, default False
        Whether the operation is a comparison method.
    )	Ú
isinstanceÚpdÚ	DataFrameÚSeriesÚIndexÚnpÚarrayÚtmÚto_array)r   r   r   s      r   Úget_upcast_boxr   ;   sˆ   € ô �$œŸ™Ô%¬°E¼2¿<¹<Ô)HÜ�|‰|ÐÜ�$œŸ	™	Ô"¤j°¼¿	¹	Ô&BÜ�y‰yÐÜ�$œŸ™Ô!¤Z°´r·x±xÔ%@ÙÜ—8‘8ˆOÜ�x‰xˆÜ�;‰;Ðó    c                 óz  — |t         j                  t         j                  fvr|nt        j                  }d„ } || |k(  «      } |t        j                  |j
                  t        j                  ¬«      «      }t        j                  ||«        ||| k(  «      }t        j                  | ||«      «        || |k7  «      }t        j                  || «        ||| k7  «      }t        j                  | || «      «       dj                  g d¢«      }t        j                  t        |¬«      5  | |k   ddd«       t        j                  t        |¬«      5  | |k   ddd«       t        j                  t        |¬«      5  | |kD   ddd«       t        j                  t        |¬«      5  | |k\   ddd«       t        j                  t        |¬«      5  || k   ddd«       t        j                  t        |¬«      5  || k   ddd«       t        j                  t        |¬«      5  || kD   ddd«       t        j                  t        |¬«      5  || k\   ddd«       y# 1 sw Y   �Œ*xY w# 1 sw Y   �ŒxY w# 1 sw Y   ŒñxY w# 1 sw Y   ŒÔxY w# 1 sw Y   Œ·xY w# 1 sw Y   ŒšxY w# 1 sw Y   Œ}xY w# 1 sw Y   yxY w)a  
    Assert that comparison operations with mismatched types behave correctly.

    Parameters
    ----------
    left : np.ndarray, ExtensionArray, Index, or Series
    right : object
    box : {pd.DataFrame, pd.Series, pd.Index, pd.array, tm.to_array}
    c                 óˆ   — t        | t        «      r| j                  S t        | t        «      r| j	                  t
        «      S | S ©N)r   r   Ú_ndarrayr   ÚastypeÚbool)Úxs    r   Úxbox2z(assert_invalid_comparison.<locals>.xbox2`   s6   € ô �aÔ,Ô-Ø—:‘:ÐÜ�aœÔ&à—8‘8œD“>Ð!Øˆr    )Údtypeú|)zInvalid comparison betweenzCannot compare typeznot supported betweenzinvalid type promotionz¿The DTypes <class 'numpy.dtype\[datetime64\]'> and <class 'numpy.dtype\[int64\]'> do not have a common DType. For example they cannot be stored in a single array unless the dtype is `object`.r   N)r   r   r   r   ÚzerosÚshapeÚbool_r   Úassert_equalÚjoinr	   r
   r   )r   r   ÚboxÚxboxr(   ÚresultÚexpectedr   s           r   Úassert_invalid_comparisonr4   Q   s-  € ð œbŸh™h¬¯©Ð1Ñ1‰3´r·x±x€Dòñ �4˜5‘=Ó!€FÙ”B—H‘H˜VŸ\™\´·±Ô:Ó;€Hä‡O�O�F˜HÔ%á�5˜D‘=Ó!€FÜ‡O�O�F™D ›NÔ+á�4˜5‘=Ó!€FÜ‡O�O�F˜X˜IÔ&á�5˜D‘=Ó!€FÜ‡O�O�F™D ( ›OÔ,à
�(‰(ò	
ó€Cô 
�‰”y¨Ô	,ñ ØˆuŠ÷ä	�‰”y¨Ô	,ñ Ø�Š÷ä	�‰”y¨Ô	,ñ ØˆuŠ÷ä	�‰”y¨Ô	,ñ Ø�Š÷ä	�‰”y¨Ô	,ñ Ø�Š÷ä	�‰”y¨Ô	,ñ Ø�Š÷ä	�‰”y¨Ô	,ñ Ø�Š÷ä	�‰”y¨Ô	,ñ Ø�Š÷ð ÷ñ ú÷ñ ú÷ð ú÷ð ú÷ð ú÷ð ú÷ð ú÷ð ús`   Ä-IÅI(Å?I5Æ(JÇJÇ:JÈ#J%ÉJ1ÉI%É(I2É5I>ÊJ
ÊJÊJ"Ê%J.Ê1J:)z
cannot addr#   )F)Ú__doc__Únumpyr   r	   Úpandasr   Úpandas._testingÚ_testingr   Úpandas.core.arraysr   r   r   r   r&   r   r4   © r    r   ú<module>r<      s9   ðñó Û ã Ý ÷óó&ñ0¨ó ó,Er    