hyb
2025-11-07 cadac0a99d87c53805a07f3b4ca7fd11e524fe4a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Ë
nñúh
ãóp—dZddlZddlZddlmZmZmZmZddl    m
Z ddl m Z mZd
d„Zd d„Zd defd„Zd    „Zy) z)
Assertion helpers for arithmetic tests.
éN)Ú    DataFrameÚIndexÚSeriesÚarray)Ú BooleanArrayÚNumpyExtensionArraycóؗtjt|¬«5||zddd«tjt|¬«5||zddd«y#1swYŒ3xYw#1swYyxYw)z§
    Helper to assert that left and right cannot be added.
 
    Parameters
    ----------
    left : object
    right : object
    msg : str, default "cannot add"
    ©ÚmatchN©ÚpytestÚraisesÚ    TypeError©ÚleftÚrightÚmsgs   úQH:\Change_password\venv_build\Lib\site-packages\pandas/tests/arithmetic/common.pyÚassert_cannot_addrs]€ô
‰”y¨Ô    ,ñØ ˆuŠ ÷ä    ‰”y¨Ô    ,ñØ Š ÷ð÷ðú÷ðúsœAÁA ÁAÁ A)có¬—tjt|¬«5||zddd«tjt|¬«5||zddd«tjt|¬«5||z
ddd«tjt|¬«5||z
ddd«y#1swYŒ…xYw#1swYŒhxYw#1swYŒKxYw#1swYyxYw)z»
    Helper to assert that left and right can be neither added nor subtracted.
 
    Parameters
    ----------
    left : object
    right : object
    msg : str or None, default None
    r
Nr rs   rÚassert_invalid_addsub_typer$s±€ô
‰”y¨Ô    ,ñØ ˆuŠ ÷ä    ‰”y¨Ô    ,ñØ Š ÷ä    ‰”y¨Ô    ,ñØ ˆuŠ ÷ä    ‰”y¨Ô    ,ñØ Š ÷ð÷ ðú÷ðú÷ðú÷ðús/œB&ÁB2Á.B>ÂC
Â&B/Â2B;Â>CÃ
CÚis_cmpcón—t|t«st|t«rtSt|t«st|t«r(|r t|t«rtj
StSt|t«st|t«r|rtj
StSt jS)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.
    )Ú
isinstancerrrÚnprÚtmÚto_array)rrrs   rÚget_upcast_boxr8sx€ô$œ    Ô"¤j°¼    Ô&BÜÐܐ$œÔ¤:¨e´VÔ#<Ù ”j ¤uÔ-ä—8‘8ˆO܈ ܐ$œÔ¤*¨U´EÔ":Ù Ü—8‘8ˆO܈ Ü ;‰;Ðócó¶—|ttfvr|ntj}d„}|}t|t«r t|t«rtj}|||k(«}|tj
|j tj¬««}tj||«|||k(«}tj|||««|||k7«}tj||«|||k7«}tj|||««djgd¢«}tjt|¬«5||kddd«tjt|¬«5||kddd«tjt|¬«5||kDddd«tjt|¬«5||k\ddd«tjt|¬«5||kddd«tjt|¬«5||kddd«tjt|¬«5||kDddd«tjt|¬«5||k\ddd«y#1swYŒ*xYw#1swYŒxYw#1swYŒñxYw#1swYŒÔxYw#1swYŒ·xYw#1swYŒšxYw#1swYŒ}xYw#1swYyxYw)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 |jSt|t«r|j    t
«S|S©N)rrÚ_ndarrayrÚastypeÚbool)Úxs rÚxbox2z(assert_invalid_comparison.<locals>.xbox2`s6€ô aÔ,Ô -Ø—:‘:Ð Ü aœÔ &à—8‘8œD“>Ð !؈r)Údtypeú|)zInvalid comparison betweenzCannot compare typeznot supported betweenzinvalid 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)rrrrrÚzerosÚshapeÚbool_rÚ assert_equalÚjoinr rr)    rrÚboxÚxboxr'Úrev_boxÚresultÚexpectedrs             rÚassert_invalid_comparisonr4QsG€ðœe¤U˜^Ñ+‰3´·±€Dòð€Gܐ%œÔ¤J¨t´VÔ$<Ü—(‘(ˆá 4˜5‘=Ó !€FÙ”B—H‘H˜VŸ\™\´·±Ô:Ó;€Hä‡OOF˜HÔ%á 5˜D‘=Ó !€F܇OOF™G HÓ-Ô.á 4˜5‘=Ó !€F܇OOF˜X˜IÔ&á 5˜D‘=Ó !€F܇OOF™G X IÓ.Ô/à
(‰(ò     
ó €Cô
‰”y¨Ô    ,ñØ ˆuŠ ÷ä    ‰”y¨Ô    ,ñØ Š ÷ä    ‰”y¨Ô    ,ñØ ˆuŠ ÷ä    ‰”y¨Ô    ,ñØ Š ÷ä    ‰”y¨Ô    ,ñØ Š ÷ä    ‰”y¨Ô    ,ñØ Š ÷ä    ‰”y¨Ô    ,ñØ Š ÷ä    ‰”y¨Ô    ,ñØ Š ÷ð÷ñú÷ñú÷ðú÷ðú÷ðú÷ðú÷ðú÷ðús`Å I9Å4JÆJÇJÇ/J+ÈJ7ÉKÉ*KÉ9JÊJÊJÊJ(Ê+J4Ê7KËK ËK)z
cannot addr")F)Ú__doc__Únumpyrr ÚpandasrrrrÚpandas._testingÚ_testingrÚpandas.core.arraysrrrrr%rr4©rrú<module>r<sBðñóÛ ÷óõ ÷ó ó ñ(¨óó2Jr