MCPcopy Create free account
hub / github.com/apache/arrow / __dlpack__

Method __dlpack__

python/pyarrow/interchange/buffer.py:72–83  ·  view source on GitHub ↗

Produce DLPack capsule (see array API standard). Raises: - TypeError : if the buffer contains unsupported dtypes. - NotImplementedError : if DLPack support is not implemented Useful to have to connect to array libraries. Support optional because

(self)

Source from the content-addressed store, hash-verified

70 return self._x.address
71
72 def __dlpack__(self):
73 """
74 Produce DLPack capsule (see array API standard).
75
76 Raises:
77 - TypeError : if the buffer contains unsupported dtypes.
78 - NotImplementedError : if DLPack support is not implemented
79
80 Useful to have to connect to array libraries. Support optional because
81 it's not completely trivial to implement for a Python-only library.
82 """
83 raise NotImplementedError("__dlpack__")
84
85 def __dlpack_device__(self) -> tuple[DlpackDeviceType, int | None]:
86 """

Callers 2

check_dlpack_exportFunction · 0.80
test_non_cpu_arrayFunction · 0.80

Calls

no outgoing calls

Tested by 2

check_dlpack_exportFunction · 0.64
test_non_cpu_arrayFunction · 0.64