zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
U
­ý°dºã@sFddlZddlZddlmZmZmZdd„Zdd„ZGdd„dƒZ    dS)    éN)Úis_scalar_indexerÚlength_of_indexerÚvalidate_indicescCs.tjdtd}d|d<t|ƒ}|dks*t‚dS)Né)Zdtypeér)ÚnpÚzerosÚboolrÚAssertionError)ZarrÚresult©r úZd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/indexing/test_indexers.pyÚtest_length_of_indexer srcCsÊd}t|dƒst‚t|ddƒr$t‚t dg¡df}t|dƒrBt‚t dg¡t dg¡f}t|dƒrht‚t dg¡t ddg¡f}t|dƒrt‚ttdƒdƒr¢t‚d}t|dƒs´t‚d}t|dƒsÆt‚dS)N)rrérrér)r)rr
rÚarrayÚslice)Zindexerr r r Útest_is_scalar_indexersrc@s,eZdZdd„Zdd„Zdd„Zdd„Zd    S)
ÚTestValidateIndicescCsBt ddg¡}t|dƒt|dd…dƒtt ddg¡dƒdS)Nrrréÿÿÿÿ)rÚasarrayrr©ÚselfÚindicesr r r Útest_validate_indices_ok+s
z,TestValidateIndices.test_validate_indices_okc    Cs6t ddg¡}tjtddt|dƒW5QRXdS)Nréþÿÿÿz'indices' contains©Úmatchr)rrÚpytestÚraisesÚ
ValueErrorrrr r r Útest_validate_indices_low1sz-TestValidateIndices.test_validate_indices_lowc    Cs8t dddg¡}tjtddt|dƒW5QRXdS)Nrrrúindices are outr)rrrrÚ
IndexErrorrrr r r Útest_validate_indices_high6sz.TestValidateIndices.test_validate_indices_highc    Cs2tjtddtt ddg¡dƒW5QRXdS)Nr"rrr)rrr#rrr)rr r r Útest_validate_indices_empty;sz/TestValidateIndices.test_validate_indices_emptyN)Ú__name__Ú
__module__Ú __qualname__rr!r$r%r r r r r*sr)
ÚnumpyrrZpandas.core.indexersrrrrrrr r r r Ú<module>s