gL i}HddlZddlZddlmZmZmZdZdZGddZ y)N)is_scalar_indexerlength_of_indexervalidate_indiceschtjdt}d|d<t|}|dk(sJy)N)dtyper)npzerosboolr)arrresults i/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pandas/tests/indexing/test_indexers.pytest_length_of_indexerr s1 ((1D !C CF s #F Q;;cd}t|dsJt|ddrJtjdgdf}t|drJtjdgtjdgf}t|drJtjdgtjddgf}t|drJttddrJd}t|dsJd}t|dsJy)N)rr rr r)r)rr arrayslice)indexers rtest_is_scalar_indexerrsG Wa (( ( Q// /xx}a G !,, ,xx}bhhsm,G !,, ,xx}bhh1v./G !,, , ta00 0G Wa (( (G Wa (( (rc$eZdZdZdZdZdZy)TestValidateIndicesctjddg}t|dt|dddttjddgdy)Nrr r)r asarrayrrselfindicess rtest_validate_indices_okz,TestValidateIndices.test_validate_indices_ok+sE**aV$!$!a(2r(+Q/rctjddg}tjtd5t |ddddy#1swYyxYw)Nrz'indices' containsmatchr)r rpytestraises ValueErrorrrs rtest_validate_indices_lowz-TestValidateIndices.test_validate_indices_low1sB**aW% ]]:-A B ) Wa ( ) ) ) A  Actjgd}tjtd5t |ddddy#1swYyxYw)N)rr rindices are outr$r)r rr&r' IndexErrorrrs rtest_validate_indices_highz.TestValidateIndices.test_validate_indices_high6s>**Y' ]]:-> ? ) Wa ( ) ) )r*ctjtd5tt j ddgddddy#1swYyxYw)Nr,r$rr )r&r'r-rr r)rs rtest_validate_indices_emptyz/TestValidateIndices.test_validate_indices_empty;s= ]]:-> ? 2 RXXq!f-q 1 2 2 2s "AAN)__name__ __module__ __qualname__r!r)r.r0rrrr*s0 ) ) 2rr) numpyr r&pandas.core.indexersrrrrrrr4rrr7s) ).22r