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)
| 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 | """ |
no outgoing calls