+
    Ŝif4                    L   ^ RI Ht ^ RIt^ RIHtHtHtHt ^ RIt	^ RI
HtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHt ]'       d   ^ RIt^ RIHtH t H!t! ^ RIH"t" ]]! R4       ! R R]4      4       4       t#RR R llt$]! R4       ! R R]4      4       t%R# )    )annotationsN)TYPE_CHECKINGClassVarSelfcast)libmissing)
set_module)is_list_like)register_extension_dtype)isna)ops)masked_accumulations)BaseMaskedArrayBaseMaskedDtype)DtypeObjnpttype_t)ExtensionDtypepandasc                      ] tR t^*t$ RtRtR]R&   Rt]R R l4       t	]R R	 l4       t
]R
 R l4       tR R ltR R lt]R R l4       t]R R l4       tR R ltRtR# )BooleanDtypea  
Extension dtype for boolean data.

This is a pandas Extension dtype for boolean data with support for
missing values. BooleanDtype is the dtype companion to :class:`.BooleanArray`,
which implements Kleene logic (sometimes called three-value logic) for
logical operations. See :ref:`boolean.kleene` for more.

.. warning::

    BooleanDtype is considered experimental. The implementation and
    parts of the API may change without warning.

Attributes
----------
None

Methods
-------
None

See Also
--------
arrays.BooleanArray : Array of boolean (True/False) data with missing values.
Int64Dtype : Extension dtype for int64 integer data.
StringDtype : Extension dtype for string data.

Examples
--------
>>> pd.BooleanDtype()
BooleanDtype

>>> pd.array([True, False, None], dtype=pd.BooleanDtype())
<BooleanArray>
[True, False, <NA>]
Length: 3, dtype: boolean

>>> pd.array([True, False, None], dtype="boolean")
<BooleanArray>
[True, False, <NA>]
Length: 3, dtype: boolean
booleanzClassVar[str]nameFc                   V ^8  d   QhRR/# )   returntype )formats   "c/Users/mibo/.openclaw/workspace/.venv-ak/lib/python3.14/site-packages/pandas/core/arrays/boolean.py__annotate__BooleanDtype.__annotate__`   s      d     c                	"    \         P                  # N)npbool_selfs   &r!   r   BooleanDtype.type_   s    xxr$   c                   V ^8  d   QhRR/# r   r   strr   )r    s   "r!   r"   r#   d   s      c r$   c                	    R # )br   r)   s   &r!   kindBooleanDtype.kindc   s    r$   c                   V ^8  d   QhRR/# )r   r   znp.dtyper   )r    s   "r!   r"   r#   h   s        X  r$   c                	.    \         P                  ! R 4      # )bool)r'   dtyper)   s   &r!   numpy_dtypeBooleanDtype.numpy_dtypeg   s    xxr$   c                   V ^8  d   QhRR/# )r   r   ztype_t[BooleanArray]r   )r    s   "r!   r"   r#   k   s      &: r$   c                    \         # )zI
Return the array type associated with this dtype.

Returns
-------
type
)BooleanArrayr)   s   &r!   construct_array_type!BooleanDtype.construct_array_typek   s
     r$   c                   V ^8  d   QhRR/# r-   r   )r    s   "r!   r"   r#   u   s      # r$   c                	    R # )r   r   r)   s   &r!   __repr__BooleanDtype.__repr__u   s    r$   c                   V ^8  d   QhRR/# r   r   r5   r   )r    s   "r!   r"   r#   y         T r$   c                	    R # Tr   r)   s   &r!   _is_booleanBooleanDtype._is_booleanx       r$   c                   V ^8  d   QhRR/# rC   r   )r    s   "r!   r"   r#   }   rD   r$   c                	    R # rF   r   r)   s   &r!   _is_numericBooleanDtype._is_numeric|   rI   r$   c                    V ^8  d   QhRRRR/# )r   arrayz$pyarrow.Array | pyarrow.ChunkedArrayr   r;   r   )r    s   "r!   r"   r#      s     /; /;9/;	/;r$   c                V   ^ RI pVP                  VP                  ! 4       8w  dE   VP                  P	                  VP                  4      '       g   \        RVP                   R24      h\        WP                  4      '       d   V.p\        V4      pMVP                  pVP                  4       pVP                  P	                  VP                  4      '       dD   \        P                  ! V\        R7      p\        P                  ! V\        R7      p\        We4      # . pV EF  pVP!                  4       p	VP                  P#                  VP                  \        V4      RV	^,          .VP$                  R7      P'                  RR7      pVP(                  ^ 8w  dZ   VP                  P#                  VP                  \        V4      RV	^ ,          .VP$                  R7      P'                  RR7      pV( pM%\        P*                  ! \        V4      \        R7      p\        We4      p
VP-                  V
4       EK  	  V'       gU   \        \        P.                  ! . \        P                  R7      \        P.                  ! . \        P                  R7      4      # \        P1                  V4      # )z9
Construct BooleanArray from pyarrow Array/ChunkedArray.
Nz$Expected array of boolean type, got z insteadr6   )offsetF)zero_copy_only)pyarrowr   r(   typesis_null	TypeError
isinstanceArraylenchunkslengthr'   onesr5   emptyr;   buffersfrom_buffersrR   to_numpy
null_countzerosappendrO   _concat_same_type)r*   rO   rT   r[   r\   maskdataresultsarrbuflistbool_arrs   &&         r!   __from_arrow__BooleanDtype.__from_arrow__   s    	::(1F1Fuzz1R1RB5::,hWXXe]]++WFZF \\F\\^F==  ,,776.D88F$/D++CkkmG''44#c(T71:$6szz 5 heh,  ~~"++88HHc#hwqz(:3:: 9 (%(0  uxxC5#D/HNN8$   288,bhhr.J   11'::r$   r   N)__name__
__module____qualname____firstlineno____doc__r   __annotations___internal_fill_valuepropertyr   r1   r7   r<   r@   rG   rL   rl   __static_attributes__r   r$   r!   r   r   *   s    )V $D-# !            /; /;r$   r   c                    V ^8  d   QhRRRR/# )r   copyr5   r   tuple[np.ndarray, np.ndarray]r   )r    s   "r!   r"   r"      s      R R!R"Rr$   c                0   \        V \        4      '       dR   Ve   \        R4      hV P                  V P                  rV'       d!   V P                  4       p VP                  4       pW3# Rp\        V \        P                  4      '       d:   V P                  \        P                  8X  d   V'       d   V P                  4       p EM\        V \        P                  4      '       d   V P                  P                  R9   d   \        V 4      p\        P                  ! \        V 4      \        R7      pW( ,          P                  \        4      WC( &   \        P                   ! WC( ,          P                  V P                  4      W( ,          8H  4      '       g   \#        R4      hTp EM
\        P$                  ! V \&        R7      p\(        P*                  ! VRR7      pRpVRR	.VO59  d   \#        R4      h\-        R
\        V4      4      p\        P                  ! \        V 4      \        R7      p WS( ,          P                  \        4      W( &   Wg9   d_   \        P                   ! W( ,          P                  \.        4      WS( ,          P                  \.        4      8H  4      '       g   \#        R4      hVf,   Vf(   \        P                  ! V P0                  \        R7      pMVf   TpM\        V\        P                  4      '       dF   VP                  \        P                  8X  d'   Ve
   W,          pMAV'       d   VP                  4       pM(\        P2                  ! V\        R7      pVe	   W,          pV P0                  VP0                  8w  d   \        R4      hW3# )z
Coerce the input values array to numpy arrays with a mask.

Parameters
----------
values : 1D list-like
mask : bool 1D array, optional
copy : bool, default False
    if True, copy the input

Returns
-------
tuple of (values, mask)
Nz'cannot pass mask for BooleanArray inputiufcbrQ   zNeed to pass bool-like valuesT)skipnar   r^   npt.NDArray[np.bool_]z&values.shape and mask.shape must match)floatingintegerzmixed-integer-float)rX   r;   
ValueError_data_maskrx   r'   ndarrayr6   r(   r1   r   rc   rZ   r5   astypeallrW   asarrayobjectr   infer_dtyper   floatshaperO   )valuesrf   rx   mask_valuesvalues_boolvalues_objectinferred_dtypeinteger_likes   &&&     r!   coerce_to_arrayr      s   " &,''FGG||V\\[[]F99;D|K&"**%%&,,"((*B[[]F	FBJJ	'	'FLL,=,=,H6lhhs6{$7$*<$8$?$?$EL!vv%,,V\\:f\>RR
 
 ;<<

68tDE)W!D|!DD;<< 2D4GH#f+T2,\:AA$G| *FF|$++E2 .55e<= 
 ;<<|+xxD1		D"**	%	%$***@"%D99;DxxD)"%D||tzz!ABB<r$   zpandas.arraysc            	      "  a  ] tR tRtRt0 Rmt0 Rmt]R V 3R ll4       tRR V 3R lllt	]
R R	 l4       t]R
RRRRRRR/R R ll4       t]P                  ]P                   ]]P$                  3t]R
R/R R ll4       tR tRR/R R lltRtV ;t# )r;   i  a  
Array of boolean (True/False) data with missing values.

This is a pandas Extension array for boolean data, under the hood
represented by 2 numpy arrays: a boolean array with the data and
a boolean array with the mask (True indicating missing).

BooleanArray implements Kleene logic (sometimes called three-value
logic) for logical operations. See :ref:`boolean.kleene` for more.

To construct a BooleanArray from generic array-like input, use
:func:`pandas.array` specifying ``dtype="boolean"`` (see examples
below).

.. warning::

   BooleanArray is considered experimental. The implementation and
   parts of the API may change without warning.

Parameters
----------
values : numpy.ndarray
    A 1-d boolean-dtype array with the data.
mask : numpy.ndarray
    A 1-d boolean-dtype array indicating missing values (True
    indicates missing).
copy : bool, default False
    Whether to copy the `values` and `mask` arrays.

Attributes
----------
None

Methods
-------
None

Returns
-------
BooleanArray

See Also
--------
array : Create an array from data with the appropriate dtype.
BooleanDtype : Extension dtype for boolean data.
Series : One-dimensional ndarray with axis labels (including time series).
DataFrame : Two-dimensional, size-mutable, potentially heterogeneous tabular data.

Examples
--------
Create a BooleanArray with :func:`pandas.array`:

>>> pd.array([True, False, None], dtype="boolean")
<BooleanArray>
[True, False, <NA>]
Length: 3, dtype: boolean
c               $    V ^8  d   QhRRRRRR/# )r   r   
np.ndarrayrf   r}   r   r   r   )r    s   "r!   r"   BooleanArray.__annotate__G  s"       3H T r$   c                	D   < \         SV `  W4      p\        4       Vn        V# r&   )super_simple_newr   _dtype)clsr   rf   result	__class__s   &&& r!   r   BooleanArray._simple_newF  s     $V2$r$   Fc               (    V ^8  d   QhRRRRRRRR/# )r   r   r   rf   rx   r5   r   Noner   )r    s   "r!   r"   r   L  s,     	2 	2 	2(2	2:>	2		2r$   c                	   < \        V\        P                  4      '       d    VP                  \        P                  8X  g   \        R 4      h\        4       V n        \        SV `%  WVR7       R# )zIvalues should be boolean numpy array. Use the 'pd.array' function insteadrx   N)
rX   r'   r   r6   r(   rW   r   r   r   __init__)r*   r   rf   rx   r   s   &&&&r!   r   BooleanArray.__init__L  sT     62::..6<<2883K2  #nD1r$   c                   V ^8  d   QhRR/# )r   r   r   r   )r    s   "r!   r"   r   X  s      | r$   c                	    V P                   # r&   r   r)   s   &r!   r6   BooleanArray.dtypeW  s    {{r$   rx   true_valuesNfalse_valuesnone_valuesc               4    V ^8  d   QhRRRRRRRRR	RR
RRR/# )r   stringsz	list[str]r6   r   rx   r5   r   zlist[str] | Noner   r   r   r;   r   )r    s   "r!   r"   r   \  sY     C CC 	C
 C &C 'C &C 
Cr$   c               	p  aa
a V P                   P                  T;'       g    . 4      oV P                  P                  T;'       g    . 4      o
Sf   . oR V
VV3R llp\        P                  ! V\
        R7      p\        V4      p	\        \        WxV	( ,          4      4      W( &   V P                  WVR7      # )Nc                   V ^8  d   QhRR/# )r   r   zbool | Noner   )r    s   "r!   r"   <BooleanArray._from_sequence_of_strings.<locals>.__annotate__l  s     	@ 	@[ 	@r$   c                V   < V S9   d   R # V S9   d   R# V S9   d   R# \        V  R24      h)TFNz cannot be cast to bool)r   )sfalse_values_unionr   true_values_unions   &r!   
map_string:BooleanArray._from_sequence_of_strings.<locals>.map_stringl  s9    %%((k! A3&=!>??r$   rQ   )r6   rx   )
_TRUE_VALUESunion_FALSE_VALUESr'   rO   r   r   listmap_from_sequence)r   r   r6   rx   r   r   r   r   scalarsrf   r   r   s   &&$$$$d   @@r!   _from_sequence_of_strings&BooleanArray._from_sequence_of_strings[  s      ,,22;3D3D"E ..44\5G5GRHK	@ 	@ ((7&1G}c*ten=>!!'T!BBr$   c               $    V ^8  d   QhRRRRRR/# )r   r6   r   rx   r5   r   ry   r   )r    s   "r!   r"   r   ~  s$     1 1&1.21	&1r$   c               	<    V'       d
   VR 8X  g   Q h\        WR7      # )r   r   )r   )r   valuer6   rx   s   &&$$r!   _coerce_to_arrayBooleanArray._coerce_to_array}  s      I%%%u00r$   c                	>   VP                   R	9   g   Q h\        P                  ! V4      pRp\        V\        4      '       d   VP
                  VP                  rAM\        V4      '       d@   \        P                  ! VRR7      pVP                  ^8  d   \        # \        VRR7      w  rM0\        V\        P                  4      '       d   VP                  4       pV'       dS   V\        P                   Jd?   \        P"                  ! V4      '       g#   \%        R\'        V4      P                    R24      hV'       g%   \)        V 4      \)        V4      8w  d   \+        R4      hVP                   R
9   d0   \,        P.                  ! V P
                  WP                  V4      w  rTMnVP                   R9   d0   \,        P0                  ! V P
                  WP                  V4      w  rTM.\,        P2                  ! V P
                  WP                  V4      w  rTV P5                  WT4      # )or_Nr5   rQ   Fr   z+'other' should be pandas.NA or a bool. Got z	 instead.zLengths must match>   r   xorand_ror_rxorrand_>   r   r   >   r   r   )rn   r   	is_scalarrX   r;   r   r   r   r'   r   ndimNotImplementedr   r(   item
libmissingNAis_boolrW   r   rZ   r   r   	kleene_or
kleene_and
kleene_xor_maybe_mask_result)r*   otheropother_is_scalarrf   r   s   &&&   r!   _logical_methodBooleanArray._logical_method  s   {{MMMM--.e\**++u{{4%  JJuF3EzzA~%%)%e<KE4rxx((JJLEuJMM9#++eBTBTE{++,I7 
 3t9E
#:122;;/)==UJJMLFD[[-->>$**eZZNLFD >>$**eZZNLF &&v44r$   r|   Tc               $    V ^8  d   QhRRRRRR/# )r   r   r.   r|   r5   r   r   r   )r    s   "r!   r"   r     s$      $(	r$   c               	   V P                   pV P                  pVR9   d/   \        \        V4      pV! WE3RV/VB w  rEV P	                  WE4      # ^ RIHp V! VP                  \        4      V4      P                  ! V3RV/VB # )cumminr|   )IntegerArray)r   cummax)
r   r   getattrr   r   pandas.core.arraysr   r   int_accumulate)r*   r   r|   kwargsrg   rf   r   r   s   &&$,    r!   r   BooleanArray._accumulate  s     zzzz''-t4BD@v@@JD##D//7C 0$7CC#'- r$   r   >   1TRUETruetrue1.0>   0FALSEFalsefalse0.0)F)rn   ro   rp   rq   rr   r   r   classmethodr   r   ru   r6   r   r'   r   numbersNumberr5   r(   _HANDLED_TYPESr   r   r   rv   __classcell__)r   s   @r!   r;   r;     s    8t 8L;M 
	2 	2   C
 C )-C *.C )-C C> jj'..$AN15:1 1!5F+/ r$   r;   )NF)&
__future__r   r   typingr   r   r   r   numpyr'   pandas._libsr   r	   r   pandas.util._decoratorsr
   pandas.core.dtypes.commonr   pandas.core.dtypes.dtypesr   pandas.core.dtypes.missingr   pandas.corer   pandas.core.array_algosr   pandas.core.arrays.maskedr   r   rT   pandas._typingr   r   r   r   r   r   r;   r   r$   r!   <module>r     s    "    / 2 > +  8
   9 HC;? C;  C;LRj On? n nr$   