
    Eg[
                     B   d dl Zd dlZd dlZd dlmZ d dlm	Z	  G d d          Z
ej                            d ej        g dd           ej        dd           f ej        g d	d
           ej        d
d           f ej        g de           ej        ed           f ej        g dd           ej        d          f ej        g d	d           ej        d
          f ej        g dd           ej        e          fg          d             ZdS )    N)SparseArrayc                       e Zd Zej                            dddg          d             Zej                            dddg          d             ZdS )TestSparseArrayConcatkindintegerblockc                     t          g d|          }t          g d|          }t          j        ||g          }t          j        g dd          }t	          j        |j        |           |j        |k    sJ d S )N   r   r      r   r   r   r   r   r   r   r   r   r   int64dtyper   _concat_same_typenparraytmassert_numpy_array_equal	sp_valuesr   )selfr   abresultexpecteds         c/var/www/sysmax/venv/lib/python3.11/site-packages/pandas/tests/arrays/sparse/test_combine_concat.py
test_basicz TestSparseArrayConcat.test_basic
   s    40004000.1v66 8OOO7;;;
#F$4h???{d""""""    c                    |dk    rdnd}t          g d|          }t          g d|          }t          j        ||g          }t          j        g dd          }t	          j        |j        |           |j        |k    sJ d S )	Nr   r   r
   r   r   r   r   r   r   )r   r   otherr   r   r   r   s          r   test_uses_first_kindz*TestSparseArrayConcat.test_uses_first_kind   s    !W__		'40005111.1v668OOO7;;;
#F$4h???{d""""""r!   N)__name__
__module____qualname__pytestmarkparametrizer    r$    r!   r   r   r   	   sx        [Vi%9::
# 
# ;:
# [Vi%9::# # ;:# # #r!   r   zother, expected_dtype)         r   r   )g      ?g      @g      @float64)r   r   ccategoryc                     t          j        g dt          j        dd                    }t          j        || gd          }t          j        t	          |          t	          |           z                                 |          }t          j        ||           t          j        | |gd          }t          j        t	          |           t	          |          z                                 |          }t          j        ||           d S )N)r   r   r   r   r   r   T)ignore_index)pdSeriesSparseDtypeconcatlistastyper   assert_series_equal)r#   expected_dtypes_sparser   r   s        r   test_concat_with_non_sparser=   #   s    & y".!*D*DEEEHY%(t<<<Fyh$u++566==nMMH68,,,Yx(t<<<FyetH~~566==nMMH68,,,,,r!   )numpyr   r(   pandasr4   pandas._testing_testingr   pandas.core.arrays.sparser   r   r)   r*   r5   r6   objectr   r=   r+   r!   r   <module>rD      s                  1 1 1 1 1 1# # # # # # # #4  
999G	,	,	,nbnWa.H.HI 
???)	4	4	4nbnYPQ6R6RS	???&	1	1	1>2>&!3L3LM	999J	/	/	/'1B1BC	???*	5	5	5xrx	7J7JK	???*	5	5	5xrx7G7GH "
- 
-# "
- 
- 
-r!   