
    `Vg                    R    d Z ddlmZ ddlZddlmZmZ ddlmZ d Z	d
dZ
d Zd	 Zy)zH
Functions to generate methods and pin them to the appropriate classes.
    )annotationsN)ABCDataFrame	ABCSeries)	roperatorc                v    ddl m}m}m} t	        | t
              r|}|}||fS t	        | t              r|}|}fS )a'  
    Find the appropriate operation-wrappers to use when defining flex/special
    arithmetic, boolean, and comparison operations with the given class.

    Parameters
    ----------
    cls : class

    Returns
    -------
    arith_flex : function or None
    comp_flex : function or None
    r   )flex_arith_method_FRAMEflex_comp_method_FRAMEflex_method_SERIES)pandas.core.opsr   r	   r
   
issubclassr   r   )clsr   r	   r
   
arith_flex	comp_flexs         X/var/www/html/hubwallet-dev/venv/lib/python3.12/site-packages/pandas/core/ops/methods.py_get_method_wrappersr      sP       #y!'
&	 y   
C	&,
*	y      c                    t        |       \  }}t        | ||      j                  d   d   d   d       t        fddD              rJ t	        |        y)	z
    Adds the full suite of flex arithmetic methods (``pow``, ``mul``, ``add``)
    to the class.

    Parameters
    ----------
    cls : class
        flex methods will be defined and pinned to this class
    mulsubdiv)multiplysubtractdividec              3  &   K   | ]  }|v  
 y wN ).0knamenew_methodss     r   	<genexpr>z.add_flex_arithmetic_methods.<locals>.<genexpr>D   s     OE5K'Os   )ror_rxorrand_)r   N)r   _create_methodsupdateany_add_methods)r   flex_arith_methodflex_comp_methodr   s      @r   add_flex_arithmetic_methodsr*   0   sr     +?s*C''!#'8:JKK#E*#E*!%(	
 O5NOOOO+.r   c                   t        | t              }i }|j                   |t        j                         |t
        j                         |t        j                         |t        j                         |t        j                         |t        j                         |t        j                         |t        j                         |t
        j                         |t
        j                         |t
        j                         |t
        j                          |t
        j"                         |t
        j$                        d       |d   |d<   |d   |d<   |r( |t&              |d<    |t
        j(                        |d<   |j                   |t        j*                         |t        j,                         |t        j.                         |t        j0                         |t        j2                         |t        j4                        d       |j7                         D ci c]  \  }}|j9                  d	      | }}}|S c c}}w )
N)addraddr   r   truedivfloordivmodpowrmulrsubrtruediv	rfloordivrpowrmodr.   r   r4   rdivdivmodrdivmod)eqneltgtlege_)r   r   r%   operatorr,   r   r-   r   r   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r9   r:   r;   r<   r=   r>   r?   r@   itemsstrip)r   arith_methodcomp_methodhave_divmodr   kvs          r   r$   r$   I   s    S),K K- 0--#H$4$45$X%6%67-- 0 0$Y%7%78%i&9&9: 0 0	
$ %Y/K%j1K ,V 4H!-i.?.?!@Ihkk*hkk*hkk*hkk*hkk*hkk*	
	 0;/@/@/BCtq!1773<?CKC Ds   (I	c                N    |j                         D ]  \  }}t        | ||        y r   )rC   setattr)r   r   namemethods       r   r'   r'   z   s*    #))+ #fT6"#r   )returnNone)__doc__
__future__r   rB   pandas.core.dtypes.genericr   r   r   r   r   r*   r$   r'   r   r   r   <module>rS      s2    # 
 &!@/2.b#r   