cdef class Y:
cdef double* _ptr
def __cinit__(self, double* ptr):
self._ptr = ptr
cdef class X:
cdef double* _ptr
def __cinit__(self):
# some magic with _ptr
self._y = Y(self._ptr)
Cannot convert double *
to Python
object
Why does this happen? Is there a nicer way of fixing this other than passing the whole X
object to Y
and extracting _ptr by hand?