| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/pandas/core/interchange/__pycache__/ |
Upload File : |
�
- �g}
� �p � d dl mZ d dlmZmZ d dlmZmZ erd dlZ d dl
Z G d� de� Z G d� de� Z
y) � )�annotations)�
TYPE_CHECKING�Any)�Buffer�DlpackDeviceTypeNc �V � e Zd ZdZd d
d�Zedd�� Zedd�� Zdd�Zd
d�Z dd�Z
y)�PandasBuffer�F
Data in the buffer is guaranteed to be contiguous in memory.
c �� � |j d rI|j |j j fk( s%|r|j � }|| _ yt d� �|| _ y)zG
Handle only regular columns (= numpy arrays) for now.
r zBExports cannot be zero-copy in the case of a non-contiguous bufferN)�strides�dtype�itemsize�copy�RuntimeError�_x)�self�x�
allow_copys �@C:\Python312\Lib\site-packages\pandas/core/interchange/buffer.py�__init__zPandasBuffer.__init__ s] � �
�9�9�Q�<�� � �a�g�g�.>�.>�-@� @� ��F�F�H�� ��� #�1�� � ��� c �p � | j j | j j j z S �z'
Buffer size in bytes.
)r �sizer
r �r s r �bufsizezPandasBuffer.bufsize* s% � �
�w�w�|�|�d�g�g�m�m�4�4�4�4r c �: � | j j d d S )�?
Pointer to start of the buffer as an integer.
�datar )r �__array_interface__r s r �ptrzPandasBuffer.ptr1 s � �
�w�w�*�*�6�2�1�5�5r c �6 � | j j � S �z?
Represent this structure as DLPack interface.
)r �
__dlpack__r s r r$ zPandasBuffer.__dlpack__8 s � � �w�w�!�!�#�#r c �&