
    Pi:                         d Z ddlZddlZddlmc mZ ddlm	Z	 ddl
mZ  G d d          Zd Zej                            dg ddg          d	             Z ej        d
          d             ZdS )z=
Tests for np.foo applied to Series, not necessarily ufuncs.
    N)Seriesc                       e Zd Zd ZdS )TestPtpc                     d}t           j                            d                              |          }t	          |          }t          j        |          t          j        |          k    sJ d S )Ni     )nprandomdefault_rngstandard_normalr   ptp)selfNarrsers       t/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/pandas/tests/series/test_npfuncs.pytest_ptpzTestPtp.test_ptp   s\    i##A&&66q99Skkvc{{bfSkk))))))    N)__name__
__module____qualname__r    r   r   r   r      s#        * * * * *r   r   c                 .    t          j        |            d S )N)r   unique)datetime_seriess    r   test_numpy_uniquer      s    Ior   index)abcdec                 4   t          t          d          | t          j                  }t          j        |dk                                  t          j                  }t          j        dgdggt          j                  }t          j        ||           d S )N   )r   dtyper         r$   )	r   ranger   int64argwhereastypearraytmassert_numpy_array_equal)r   sresultexpecteds       r   test_numpy_argwherer2      sz     	uQxxuBH555A[Q&&rx00Fx!qc
"(333H11111r   pyarrowc                 d   t          g dd          }| rPt          j        |          }t          j        t          g dd                    }t          j        ||           d S d}t          j        t          |          5  t          j        |           d d d            d S # 1 swxY w Y   d S )N)   r   Nzfloat64[pyarrow]r'   z'loop of ufunc does not support argument)match)r   r   logr-   assert_series_equalpytestraises	TypeError)using_nan_is_nar   r0   r1   msgs        r   #test_log_arrow_backed_missing_valuer>   (   s     %7
8
8
8C 6&5GHHHII
vx00000 8]9C000 	 	F3KKK	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   B%%B),B))__doc__numpyr   r9   pandas.util._test_decoratorsutil_test_decoratorstdpandasr   pandas._testing_testingr-   r   r   markparametrizer2   
skip_if_nor>   r   r   r   <module>rK      s	         ) ) ) ) ) ) ) ) )            * * * * * * * *  
 #<#<#<d"CDD2 2 ED2 y    r   