| 277 | } |
| 278 | |
| 279 | PyObject * |
| 280 | array_dlpack_device(PyArrayObject *self, PyObject *NPY_UNUSED(args)) |
| 281 | { |
| 282 | DLDevice device = array_get_dl_device(self); |
| 283 | if (PyErr_Occurred()) { |
| 284 | return NULL; |
| 285 | } |
| 286 | return Py_BuildValue("ii", device.device_type, device.device_id); |
| 287 | } |
| 288 | |
| 289 | NPY_NO_EXPORT PyObject * |
| 290 | from_dlpack(PyObject *NPY_UNUSED(self), PyObject *obj) { |
nothing calls this directly
no test coverage detected