
    Owg}                     H    d dl Zd dlZd dlmZmZmZ d Zd Z G d d      Z	y)    N)is_scalar_indexerlength_of_indexervalidate_indicesc                  h    t        j                  dt              } d| d<   t        |       }|dk(  sJ y )N   )dtype   r   )npzerosboolr   )arrresults     Z/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/indexing/test_indexers.pytest_length_of_indexerr      s1    
((1D
!CCFs#FQ;;    c                     d} t        | d      sJ t        | d   d      rJ t        j                  dg      df} t        | d      rJ t        j                  dg      t        j                  dg      f} t        | d      rJ t        j                  dg      t        j                  ddg      f} t        | d      rJ t        t        d       d      rJ d} t        | d      sJ d} t        | d      sJ y )N)r   r	      r   r	      r   )r   )r   r
   arrayslice)indexers    r   test_is_scalar_indexerr      s    GWa((( Q///xx}a G !,,,xx}bhhsm,G !,,,xx}bhh1v./G !,,, ta000GWa(((GWa(((r   c                   $    e Zd Zd Zd Zd Zd Zy)TestValidateIndicesc                     t        j                  ddg      }t        |d       t        |d d d       t        t        j                  ddg      d       y )Nr   r	   r   )r
   asarrayr   r   selfindicess     r   test_validate_indices_okz,TestValidateIndices.test_validate_indices_ok+   sE    **aV$!$!a(2r(+Q/r   c                     t        j                  ddg      }t        j                  t        d      5  t        |d       d d d        y # 1 sw Y   y xY w)Nr   z'indices' containsmatchr   )r
   r   pytestraises
ValueErrorr   r   s     r   test_validate_indices_lowz-TestValidateIndices.test_validate_indices_low1   sB    **aW%]]:-AB 	)Wa(	) 	) 	)   A		Ac                     t        j                  g d      }t        j                  t        d      5  t        |d       d d d        y # 1 sw Y   y xY w)N)r   r	   r   indices are outr$   r   )r
   r   r&   r'   
IndexErrorr   r   s     r   test_validate_indices_highz.TestValidateIndices.test_validate_indices_high6   s>    **Y']]:->? 	)Wa(	) 	) 	)r*   c                     t        j                  t        d      5  t        t	        j
                  ddg      d       d d d        y # 1 sw Y   y xY w)Nr,   r$   r   r	   )r&   r'   r-   r   r
   r   )r   s    r   test_validate_indices_emptyz/TestValidateIndices.test_validate_indices_empty;   s=    ]]:->? 	2RXXq!f-q1	2 	2 	2s   "AAN)__name__
__module____qualname__r!   r)   r.   r0    r   r   r   r   *   s    0)
)
2r   r   )
numpyr
   r&   pandas.core.indexersr   r   r   r   r   r   r4   r   r   <module>r7      s)      ).2 2r   