1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
U
¬ý°dõã@sVddlmZddlZddlmZmZddlmZeej    ƒedƒkZ
Gdd„deƒZ dS)é)Ú annotationsN)ÚBufferÚDlpackDeviceType)ÚVersionz1.22.0c@sleZdZdZdddddœdd„Zed    d
œd d „ƒZed    d
œd d„ƒZdd„Zdd
œdd„Z    dd
œdd„Z
dS)Ú PandasBufferzF
    Data in the buffer is guaranteed to be contiguous in memory.
    Tz
np.ndarrayÚboolÚNone)ÚxÚ
allow_copyÚreturncCs0|j|jjfks&|r| ¡}ntdƒ‚||_dS)zG
        Handle only regular columns (= numpy arrays) for now.
        zBExports cannot be zero-copy in the case of a non-contiguous bufferN)ÚstridesÚdtypeÚitemsizeÚcopyÚ RuntimeErrorÚ_x)Úselfr    r
©rúUd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/core/interchange/buffer.pyÚ__init__s
ÿzPandasBuffer.__init__Úint)r cCs|jj|jjjS)z'
        Buffer size in bytes.
        )rÚsizer r©rrrrÚbufsize&szPandasBuffer.bufsizecCs|jjddS)z?
        Pointer to start of the buffer as an integer.
        Údatar)rZ__array_interface__rrrrÚptr-szPandasBuffer.ptrcCstr|j ¡Stdƒ‚dS)z?
        Represent this structure as DLPack interface.
        Ú
__dlpack__N)Ú_NUMPY_HAS_DLPACKrrÚNotImplementedErrorrrrrr4s
zPandasBuffer.__dlpack__z#tuple[DlpackDeviceType, int | None]cCs
tjdfS)zU
        Device type and device ID for where the data in the buffer resides.
        N)rZCPUrrrrÚ__dlpack_device__<szPandasBuffer.__dlpack_device__ÚstrcCs&dt|j|j| ¡djdœƒdS)Nz PandasBuffer(r)rrZdeviceú))r rrrÚnamerrrrÚ__repr__Bs ýÿÿøÿzPandasBuffer.__repr__N)T) Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚpropertyrrrrr#rrrrrsr) Ú
__future__rÚnumpyÚnpZ*pandas.core.interchange.dataframe_protocolrrZpandas.util.versionrÚ __version__rrrrrrÚ<module>s