§
    Ò¬¸jí!  ã                  óZ  — U d dl mZ d dlmZ d dlmZmZmZmZm	Z	m
Z
 d dlmZ erd dlmZmZ d dlmZ d dlmZ d dlmZ  G d	„ d
e¦  «        Z G d„ de¦  «        Zeeeeef         Zded<    G d„ de¦  «        Z G d„ de
¦  «        Z G d„ de
¦  «        Z G d„ de	¦  «        Z G d„ de	¦  «        Z  G d„ de	¦  «        Z! G d„ de	¦  «        Z" G d„ d¦  «        Z# G d„ d e$¦  «        Z% G d!„ d"¦  «        Z&e& '                    d ¦  «        e&_(        e& '                    d#¦  «        e&_)        d$S )%é    )Úannotations)ÚIntEnum)ÚTYPE_CHECKINGÚAnyÚClassVarÚLiteralÚProtocolÚ	TypedDict)Úissue_unstable_warning)ÚIterableÚSequence)Ú	TypeAlias)ÚPolarsBuffer)ÚPolarsColumnc                  ó2   — e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
S )ÚDlpackDeviceTypez3Integer enum for device type codes matching DLPack.é   é   é   é   é   é   é	   é
   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚCPUÚCUDAÚ
CPU_PINNEDÚOPENCLÚVULKANÚMETALÚVPIÚROCM© ó    úk/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/polars/interchange/protocol.pyr   r      s<   € € € € € Ø=Ð=à
€CØ€DØ€JØ€FØ€FØ€EØ
€CØ€D€D€Dr(   r   c                  ó.   — e Zd ZdZdZdZdZdZdZdZ	dZ
d	S )
Ú	DtypeKindað  
    Integer enum for data types.

    Attributes
    ----------
    INT : int
        Matches to signed integer data type.
    UINT : int
        Matches to unsigned integer data type.
    FLOAT : int
        Matches to floating point data type.
    BOOL : int
        Matches to boolean data type.
    STRING : int
        Matches to string data type (UTF-8 encoded).
    DATETIME : int
        Matches to datetime data type.
    CATEGORICAL : int
        Matches to categorical data type.
    r   r   r   é   é   é   é   N)r   r   r   r   ÚINTÚUINTÚFLOATÚBOOLÚSTRINGÚDATETIMEÚCATEGORICALr'   r(   r)   r+   r+   $   s=   € € € € € ðð ð* €CØ€DØ€EØ€DØ€FØ€HØ€K€K€Kr(   r+   r   ÚDtypec                  ó&   — e Zd ZdZdZdZdZdZdZdS )ÚColumnNullTypea¸  
    Integer enum for null type representation.

    Attributes
    ----------
    NON_NULLABLE : int
        Non-nullable column.
    USE_NAN : int
        Use explicit float NaN value.
    USE_SENTINEL : int
        Sentinel value besides NaN.
    USE_BITMASK : int
        The bit is set/unset representing a null on a certain position.
    USE_BYTEMASK : int
        The byte is set/unset representing a null on a certain position.
    r   r   r   r   r   N)	r   r   r   r   ÚNON_NULLABLEÚUSE_NANÚUSE_SENTINELÚUSE_BITMASKÚUSE_BYTEMASKr'   r(   r)   r9   r9   F   s3   € € € € € ðð ð" €LØ€GØ€LØ€KØ€L€L€Lr(   r9   c                  ó2   — e Zd ZU dZded<   ded<   ded<   dS )ÚColumnBufferszBuffers backing a column.ztuple[PolarsBuffer, Dtype]Údataz!tuple[PolarsBuffer, Dtype] | NoneÚvalidityÚoffsetsN©r   r   r   r   Ú__annotations__r'   r(   r)   r@   r@   _   sB   € € € € € € Ø#Ð#ð %Ð$Ð$Ñ$ð
 0Ð/Ð/Ñ/ð /Ð.Ð.Ñ.Ð.Ð.r(   r@   c                  ó2   — e Zd ZU dZded<   ded<   ded<   dS )	ÚCategoricalDescriptionz$Description of a categorical column.ÚboolÚ
is_orderedzLiteral[True]Úis_dictionaryr   Ú
categoriesNrD   r'   r(   r)   rG   rG   r   s@   € € € € € € Ø.Ð.ð ÐÐÑà Ð Ð Ñ ð ÐÐÑÐÐr(   rG   c                  óR   — e Zd ZdZedd„¦   «         Zedd„¦   «         Zdd„Zdd	„Zd
S )ÚBufferzInterchange buffer object.ÚreturnÚintc                ó   — dS )zBuffer size in bytes.Nr'   ©Úselfs    r)   ÚbufsizezBuffer.bufsize�   ó   € € € r(   c                ó   — dS )z-Pointer to start of the buffer as an integer.Nr'   rQ   s    r)   Úptrz
Buffer.ptr…   rT   r(   r   c                ó   — dS )z-Represent this structure as DLPack interface.Nr'   rQ   s    r)   Ú
__dlpack__zBuffer.__dlpack__‰   rT   r(   ú#tuple[DlpackDeviceType, int | None]c                ó   — dS )zCDevice type and device ID for where the data in the buffer resides.Nr'   rQ   s    r)   Ú__dlpack_device__zBuffer.__dlpack_device__Œ   rT   r(   N©rN   rO   )rN   r   )rN   rY   )	r   r   r   r   ÚpropertyrS   rV   rX   r[   r'   r(   r)   rM   rM   ~   s†   € € € € € Ø$Ð$àð$ð $ð $ñ „Xð$ð ð<ð <ð <ñ „Xð<ð<ð <ð <ð <ðRð Rð Rð Rð Rð Rr(   rM   c                  óÄ   — e Zd ZdZdd„Zedd„¦   «         Zedd„¦   «         Zedd	„¦   «         Zedd„¦   «         Z	edd„¦   «         Z
edd„¦   «         Zdd„Zddd„Zdd„ZdS ) ÚColumnzInterchange column object.rN   rO   c                ó   — dS )zSize of the column in elements.Nr'   rQ   s    r)   ÚsizezColumn.size“   rT   r(   c                ó   — dS )zOOffset of the first element with respect to the start of the underlying buffer.Nr'   rQ   s    r)   ÚoffsetzColumn.offset–   rT   r(   r7   c                ó   — dS )zData type of the column.Nr'   rQ   s    r)   ÚdtypezColumn.dtypeš   rT   r(   rG   c                ó   — dS )z7Description of the categorical data type of the column.Nr'   rQ   s    r)   Údescribe_categoricalzColumn.describe_categoricalž   rT   r(   útuple[ColumnNullType, Any]c                ó   — dS )z7Description of the null representation the column uses.Nr'   rQ   s    r)   Údescribe_nullzColumn.describe_null¢   rT   r(   ú
int | Nonec                ó   — dS )z"Number of null elements, if known.Nr'   rQ   s    r)   Ú
null_countzColumn.null_count¦   rT   r(   údict[str, Any]c                ó   — dS )zThe metadata for the column.Nr'   rQ   s    r)   ÚmetadatazColumn.metadataª   rT   r(   c                ó   — dS )z3Return the number of chunks the column consists of.Nr'   rQ   s    r)   Ú
num_chunkszColumn.num_chunks®   rT   r(   NÚn_chunksúIterable[Column]c                ó   — dS )z.Return an iterator yielding the column chunks.Nr'   ©rR   rs   s     r)   Ú
get_chunkszColumn.get_chunks±   rT   r(   r@   c                ó   — dS )z6Return a dictionary containing the underlying buffers.Nr'   rQ   s    r)   Úget_bufferszColumn.get_buffers´   rT   r(   r\   )rN   r7   )rN   rG   )rN   rh   ©rN   rk   ©rN   rn   ©N)rs   rk   rN   rt   )rN   r@   )r   r   r   r   ra   r]   rc   re   rg   rj   rm   rp   rr   rw   ry   r'   r(   r)   r_   r_   �   sE  € € € € € Ø$Ð$ð.ð .ð .ð .ð ð^ð ^ð ^ñ „Xð^ð ð'ð 'ð 'ñ „Xð'ð ðFð Fð Fñ „XðFð ðFð Fð Fñ „XðFð ð1ð 1ð 1ñ „Xð1ð ð+ð +ð +ñ „Xð+ðBð Bð Bð Bð=ð =ð =ð =ð =ðEð Eð Eð Eð Eð Er(   r_   c                  ó–   — e Zd ZU dZded<   	 	 d&d'd
„Zed(d„¦   «         Zd)d„Zd*d„Z	d)d„Z
d+d„Zd,d„Zd-d„Zd.d„Zd/d„Zd0d!„Zd1d2d%„Zd"S )3Ú	DataFramezInterchange dataframe object.zClassVar[int]ÚversionFTÚnan_as_nullrH   Ú
allow_copyrN   c                ó   — dS ©zNConvert to a dataframe object implementing the dataframe interchange protocol.Nr'   ©rR   r€   r�   s      r)   Ú__dataframe__zDataFrame.__dataframe__½   rT   r(   rn   c                ó   — dS )zThe metadata for the dataframe.Nr'   rQ   s    r)   rp   zDataFrame.metadataÄ   rT   r(   rO   c                ó   — dS )z.Return the number of columns in the dataframe.Nr'   rQ   s    r)   Únum_columnszDataFrame.num_columnsÈ   rT   r(   rk   c                ó   — dS )z9Return the number of rows in the dataframe, if available.Nr'   rQ   s    r)   Únum_rowszDataFrame.num_rowsË   rT   r(   c                ó   — dS )z7Return the number of chunks the dataframe consists of..Nr'   rQ   s    r)   rr   zDataFrame.num_chunksÎ   rT   r(   úIterable[str]c                ó   — dS )zReturn the column names.Nr'   rQ   s    r)   Úcolumn_nameszDataFrame.column_namesÑ   rT   r(   Úir_   c                ó   — dS )z,Return the column at the indicated position.Nr'   )rR   r�   s     r)   Ú
get_columnzDataFrame.get_columnÔ   rT   r(   ÚnameÚstrc                ó   — dS )z&Return the column with the given name.Nr'   )rR   r’   s     r)   Úget_column_by_namezDataFrame.get_column_by_name×   rT   r(   rt   c                ó   — dS )z(Return an iterator yielding the columns.Nr'   rQ   s    r)   Úget_columnszDataFrame.get_columnsÚ   rT   r(   ÚindicesúSequence[int]c                ó   — dS )zACreate a new dataframe by selecting a subset of columns by index.Nr'   )rR   r˜   s     r)   Úselect_columnszDataFrame.select_columnsÝ   rT   r(   ÚnamesúSequence[str]c                ó   — dS )z@Create a new dataframe by selecting a subset of columns by name.Nr'   )rR   rœ   s     r)   Úselect_columns_by_namez DataFrame.select_columns_by_nameà   rT   r(   Nrs   úIterable[DataFrame]c                ó   — dS )z8Return an iterator yielding the chunks of the dataframe.Nr'   rv   s     r)   rw   zDataFrame.get_chunksã   rT   r(   ©FT)r€   rH   r�   rH   rN   r~   r{   r\   rz   )rN   rŒ   )r�   rO   rN   r_   )r’   r“   rN   r_   )rN   rt   )r˜   r™   rN   r~   )rœ   r�   rN   r~   r|   )rs   rk   rN   r    )r   r   r   r   rE   r…   r]   rp   rˆ   rŠ   rr   rŽ   r‘   r•   r—   r›   rŸ   rw   r'   r(   r)   r~   r~   ¸   sR  € € € € € € Ø'Ð'àÐÐÑð "Øð]ð ]ð ]ð ]ð ]ð ð.ð .ð .ñ „Xð.ð=ð =ð =ð =ðHð Hð Hð HðFð Fð Fð Fð'ð 'ð 'ð 'ð;ð ;ð ;ð ;ð5ð 5ð 5ð 5ð7ð 7ð 7ð 7ðPð Pð Pð PðOð Oð Oð OðGð Gð Gð Gð Gð Gð Gr(   r~   c                  ó    — e Zd ZdZ	 	 d
dd„Zd	S )ÚSupportsInterchangezHDataframe that supports conversion into an interchange dataframe object.FTr€   rH   r�   rN   c                ó   — dS rƒ   r'   r„   s      r)   r…   z!SupportsInterchange.__dataframe__ê   rT   r(   Nr¢   )r€   rH   r�   rH   rN   r¤   )r   r   r   r   r…   r'   r(   r)   r¤   r¤   ç   sB   € € € € € ØRÐRð "Øð]ð ]ð ]ð ]ð ]ð ]ð ]r(   r¤   c                  ó"   — e Zd ZdZdZdZdZdZdS )Ú
Endiannessz.Enum indicating the byte-order of a data type.ú<ú>ú=ú|N)r   r   r   r   ÚLITTLEÚBIGÚNATIVEÚNAr'   r(   r)   r§   r§   ò   s(   € € € € € Ø8Ð8à€FØ
€CØ€FØ	€B€B€Br(   r§   c                  ó   — e Zd ZdZdS )ÚCopyNotAllowedErrorzMException raised when a copy is required, but `allow_copy` is set to `False`.N)r   r   r   r   r'   r(   r)   r±   r±   û   s   € € € € € ØWÐWÐWÐWr(   r±   c                  óŽ   — e Zd ZU dZded<   dd„Zedd„¦   «         Zedd	„¦   «         Zedd
„¦   «         Z	edd„¦   «         Z
dd„ZdS )ÚCompatLevelz#Data structure compatibility level.rO   Ú_versionrN   ÚNonec                ó$   — d}t          |¦  «        ‚)Nz0it is not allowed to create a CompatLevel object)Ú	TypeError)rR   Úmsgs     r)   Ú__init__zCompatLevel.__init__  s   € Ø@ˆÝ˜‰nŒnÐr(   r   c                óR   — t                                t           ¦  «        }| |_        |S r|   )r³   Ú__new__r´   )r   Úcompat_levels     r)   Ú_with_versionzCompatLevel._with_version  s#   € å"×*Ò*­;Ñ7Ô7ˆØ 'ˆÔØÐr(   c                 ó   — t           j        S r|   )r³   Ú_future1r'   r(   r)   Ú_newestzCompatLevel._newest  s   € åÔ#Ð#r(   c                 óR   — t          d¦  «         t                               ¦   «         S )zô
        Get the highest supported compatibility level.

        .. warning::
            Highest compatibility level is considered **unstable**. It may be changed
            at any point without it being considered a breaking change.
        z=using the highest compatibility level is considered unstable.)r   r³   rÀ   r'   r(   r)   ÚnewestzCompatLevel.newest  s-   € õ 	ØKñ	
ô 	
ð 	
õ ×"Ò"Ñ$Ô$Ð$r(   c                 ó   — t           j        S )zGet the most compatible level.)r³   Ú_compatibler'   r(   r)   ÚoldestzCompatLevel.oldest   s   € õ Ô&Ð&r(   r“   c                óL   — d| j         j        › d| j         j        › d| j        › d�S )Nr¨   ú.z: r©   )Ú	__class__r   r   r´   rQ   s    r)   Ú__repr__zCompatLevel.__repr__%  s/   € Ø^�4”>Ô,Ð^Ð^¨t¬~Ô/JÐ^Ð^ÈdÌmÐ^Ð^Ð^Ð^r(   N)rN   rµ   )r   rO   rN   r³   )rN   r³   )rN   r“   )r   r   r   r   rE   r¹   Ústaticmethodr½   rÀ   rÂ   rÅ   rÉ   r'   r(   r)   r³   r³   ÿ   sÓ   € € € € € € Ø-Ð-à€M€M�Mðð ð ð ð ðð ð ñ „\ðð
 ð$ð $ð $ñ „\ð$ð ð%ð %ð %ñ „\ð%ð ð'ð 'ð 'ñ „\ð'ð_ð _ð _ð _ð _ð _r(   r³   r   N)*Ú
__future__r   Úenumr   Útypingr   r   r   r   r	   r
   Úpolars._utils.unstabler   Úcollections.abcr   r   r   Úpolars.interchange.bufferr   Úpolars.interchange.columnr   r   r+   ÚtuplerO   r“   r7   rE   r9   r@   rG   rM   r_   r~   r¤   r§   ÚRuntimeErrorr±   r³   r½   rÄ   r¿   r'   r(   r)   ú<module>rÔ      sb  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð :Ð 9Ð 9Ð 9Ð 9Ð 9àð 7Ø2Ð2Ð2Ð2Ð2Ð2Ð2Ð2Ø Ð Ð Ð Ð Ð à6Ð6Ð6Ð6Ð6Ð6Ø6Ð6Ð6Ð6Ð6Ð6ð
ð 
ð 
ð 
ð 
�wñ 
ô 
ð 
ðð ð ð ð �ñ ô ð ð> ˜ C¨¨cÐ1Ô2€Ð 2Ð 2Ð 2Ñ 2ðð ð ð ð �Wñ ô ð ð2/ð /ð /ð /ð /�Iñ /ô /ð /ð&	ð 	ð 	ð 	ð 	˜Yñ 	ô 	ð 	ðRð Rð Rð Rð RˆXñ Rô Rð Rð$%Eð %Eð %Eð %Eð %EˆXñ %Eô %Eð %EðP,Gð ,Gð ,Gð ,Gð ,G�ñ ,Gô ,Gð ,Gð^]ð ]ð ]ð ]ð ]˜(ñ ]ô ]ð ]ðð ð ð ð ñ ô ð ðXð Xð Xð Xð X˜,ñ Xô Xð Xð'_ð '_ð '_ð '_ð '_ñ '_ô '_ð '_ðT &×3Ò3°AÑ6Ô6€Ô Ø"×0Ò0°Ñ3Ô3€Ô Ð Ð r(   