o
    S+ iE  ã                   @   sˆ   d Z ddlZddlZddlm  mZ ddlm	Z	 ddl
mZ G dd„ dƒZdd„ Zej dg d	¢dg¡d
d„ ƒZe d¡dd„ ƒZdS )z=
Tests for np.foo applied to Series, not necessarily ufuncs.
é    N)ÚSeriesc                   @   s   e Zd Zdd„ ZdS )ÚTestPtpc                 C   s:   d}t j d¡ |¡}t|ƒ}t  |¡t  |¡ksJ ‚d S )Niè  é   )ÚnpÚrandomZdefault_rngZstandard_normalr   Zptp)ÚselfÚNZarrÚser© r
   úl/home/app/PaddleOCR-VL-test/.venv_paddleocr/lib/python3.10/site-packages/pandas/tests/series/test_npfuncs.pyÚtest_ptp   s   zTestPtp.test_ptpN)Ú__name__Ú
__module__Ú__qualname__r   r
   r
   r
   r   r      s    r   c                 C   s   t  | ¡ d S )N)r   Úunique)Zdatetime_seriesr
   r
   r   Útest_numpy_unique   s   r   Úindex)ÚaÚbÚcÚdÚec                 C   sR   t tdƒ| tjd}t |dk¡ tj¡}tjdgdggtjd}t ||¡ d S )Né   )r   Údtyper   é   é   ©r   )	r   Úranger   Zint64ZargwhereZastypeÚarrayÚtmZassert_numpy_array_equal)r   ÚsÚresultÚexpectedr
   r
   r   Útest_numpy_argwhere   s   r#   Zpyarrowc                  C   s@   t g d¢dd} t | ¡}t t g d¢dd¡}t ||¡ d S )N)é   r   Nzfloat64[pyarrow]r   Zfloat64)r   r   Úlogr   Zassert_series_equal)r	   r!   r"   r
   r
   r   Ú#test_log_arrow_backed_missing_value(   s   
r&   )Ú__doc__Únumpyr   ZpytestZpandas.util._test_decoratorsÚutilZ_test_decoratorsÚtdZpandasr   Zpandas._testingZ_testingr   r   r   ÚmarkZparametrizer#   Z
skip_if_nor&   r
   r
   r
   r   Ú<module>   s    	
