paleolimbot commented on code in PR #409:
URL: https://github.com/apache/arrow-nanoarrow/pull/409#discussion_r1550781472
##########
python/src/nanoarrow/_lib.pyx:
##########
@@ -1038,6 +1064,12 @@ cdef class CArray:
self._base = base
self._ptr = <ArrowArray*>addr
self._schema = schema
+ self._device_type = ARROW_DEVICE_CPU
+ self._device_id = 0
+
+ cdef _set_device(self, ArrowDeviceType device_type, int64_t device_id):
+ self._device_type = device_type
+ self._device_id = device_id
Review Comment:
I would like to move away from *any* arguments in `__cinit__` in most cases
because a user could theoretically call `nanoarrow.CArray(...)` and get very
strange errors. They should really all be `ClassName._construct()` or something
(but maybe in a future PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]