
    bMh}                     P    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	dS )    N)is_scalar_indexerlength_of_indexervalidate_indicesc                  t    t          j        dt                    } d| d<   t          |           }|dk    sJ d S )N   )dtype   r   )npzerosboolr   )arrresults     c/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pandas/tests/indexing/test_indexers.pytest_length_of_indexerr      s=    
(1D
!
!
!CCFs##FQ;;;;;;    c                  0   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 d S )N)r   r	      r   r	      r   )r   )r   r
   arrayslice)indexers    r   test_is_scalar_indexerr      s%   GWa((((( Q/////x}}a G !,,,,,x}}bhsmm,G !,,,,,x}}bh1v../G !,,,,, ta00000GWa(((((GWa(((((((r   c                   &    e Zd Zd Zd Zd Zd ZdS )TestValidateIndicesc                     t          j        ddg          }t          |d           t          |d d         d           t          t          j        ddg          d           d S )Nr   r	   r   )r
   asarrayr   r   selfindicess     r   test_validate_indices_okz,TestValidateIndices.test_validate_indices_ok+   sa    *aV$$!$$$!a(((2r(++Q/////r   c                     t          j        ddg          }t          j        t          d          5  t          |d           d d d            d S # 1 swxY w Y   d S )Nr   z'indices' containsmatchr   )r
   r   pytestraises
ValueErrorr   r   s     r   test_validate_indices_lowz-TestValidateIndices.test_validate_indices_low1   s    *aW%%]:-ABBB 	) 	)Wa(((	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	)   AAAc                     t          j        g d          }t          j        t          d          5  t          |d           d d d            d S # 1 swxY w Y   d S )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    *YYY'']:->??? 	) 	)Wa(((	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	)r*   c                     t          j        t          d          5  t          t	          j        ddg          d           d d d            d S # 1 swxY w Y   d S )Nr,   r$   r   r	   )r&   r'   r-   r   r
   r   )r   s    r   test_validate_indices_emptyz/TestValidateIndices.test_validate_indices_empty;   s    ]:->??? 	2 	2RXq!f--q111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2s   %AAAN)__name__
__module____qualname__r!   r)   r.   r0    r   r   r   r   *   sP        0 0 0) ) )
) ) )
2 2 2 2 2r   r   )
numpyr
   r&   pandas.core.indexersr   r   r   r   r   r   r4   r   r   <module>r7      s                   ) ) ).2 2 2 2 2 2 2 2 2 2r   