o
    g                  
   @   s   d dl Z d dlZd dlZd dlZd dlmZ d dl	m
Z
 ejdd Zejdd Zejdd Zejjd	d
g dfdg dfgd
dgddd Zdd Zdd Zejdddejdejjdddgdd Zdd ZdS )     N)FloatingArrayc                   C   s:   t jddgd tjg ddgd  tjg ddg ddS )NTF   ,   booleandtype)pdarraynpnan r   r   i/home/ubuntu/cloudmapper/venv/lib/python3.10/site-packages/pandas/tests/arrays/boolean/test_arithmetic.pydata   s   .r   c                   C   s(   t jdgd dgd  d gd  ddS )NT   Fr   r   r   r	   r   r   r   r   
left_array   s   (r   c                   C   s   t jg dd ddS )N)TFNr   r   r   r   r   r   r   r   right_array   s   r   zopname, expadd)	TTNTFNNNNmul)	TFNFFNNNN)idsc                 C   s2   t t|}|| |}tj|dd}t|| d S )Nr   r   )getattroperatorr   r	   tmassert_extension_array_equal)r   r   opnameexpopresultexpectedr   r   r   test_add_mul!   s   
	
r   c                 C   s@   d}t jt|d | |  W d    d S 1 sw   Y  d S )Nznumpy boolean subtract, the `-` operator, is (?:deprecated|not supported), use the bitwise_xor, the `\^` operator, or the logical_xor function instead\.match)pytestraises	TypeError)r   r   msgr   r   r   test_sub0   s
   
"r&   c                 C   sV   | | }t tjdtjtjdtjtjtjtjtjg	ddtg d}t|| d S )Ng      ?g        float64r   )	FFTFFTTTT)r   r
   r	   infr   r   r   )r   r   r   r   r   r   r   test_div9   s   "r)   r   floordivmodpowz#TODO follow int8 behaviour? GH34686)reason)marksc                 C   s:   t t|}|| |}|| d|d}t|| d S )NInt8)r   r   astyper   r   )r   r   r   r   r   r   r   r   r   test_op_int8E   s   

r1   c                 C   s   |}t | }t||}d}tjt|d |d W d    n1 s$w   Y  d}tjt|d |t d W d    n1 sDw   Y  |dvrsd}tjt|d |t jd|jd W d    d S 1 slw   Y  d S d S )	Nzdid not contain a loop with signature matching types|BooleanArray cannot perform the operation|not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''r    fooz]unsupported operand type\(s\) for|Concatenation operation is not implemented for NumPy arrays20180101)__mul____rmul__zounsupported operand type\(s\) for|can only concatenate str|not all arguments converted during string formatting)index)r   Seriesr   r"   r#   r$   	Timestampr6   )r   all_arithmetic_operatorsr   sopsr%   r   r   r   test_error_invalid_valuesZ   s(   


"r<   )r   numpyr
   r"   pandasr   pandas._testing_testingr   pandas.arraysr   fixturer   r   r   markparametrizer   r&   r)   paramxfailr1   r<   r   r   r   r   <module>   sB    





	

