o
    ‡Å€g¢  ã                   @  sB   d dl mZ d dlmZ d dlZd dlmZ ddd„Zd	d
„ Z	dS )é    )Úannotations)ÚreduceN)Ú
get_optionÚreturnÚstrc                 C  s"   t | tjtfƒr|  tdƒ¡} | S )z3
    If we have bytes, decode them to unicode.
    zdisplay.encoding)Ú
isinstanceÚnpÚbytes_ÚbytesÚdecoder   )Ús© r   úR/var/www/html/myenv/lib/python3.10/site-packages/pandas/core/computation/common.pyÚensure_decoded
   s   r   c                  G  sÚ   zt j| Ž W S  ty   tt j| ƒ Y S  tyl   ddlm} ddlm} t	| ƒ}g g }}|D ]}||ƒr>| 
|¡ q2| 
|¡ q2|rfzt j|Ž }W n ty\   tt j| ƒ}Y nw |||g ƒ Y S ||ƒ Y S w )zc
    Wrapper around numpy.result_type which overcomes the NPY_MAXARGS (32)
    argument limit.
    r   )Úfind_common_type)Úis_extension_array_dtype)r   Úresult_typeÚ
ValueErrorr   Ú	TypeErrorÚpandas.core.dtypes.castr   Úpandas.core.dtypes.commonr   ÚlistÚappend)Úarrays_and_dtypesr   r   Úarr_and_dtypesÚ	ea_dtypesÚnon_ea_dtypesÚarr_or_dtypeÚnp_dtyper   r   r   Úresult_type_many   s,   
ÿír   )r   r   )
Ú
__future__r   Ú	functoolsr   Únumpyr   Úpandas._configr   r   r   r   r   r   r   Ú<module>   s    
	