I have a function expecting array pointers in Cython, e.g. with the signature
cdef void foo(DTYPE_t* x)
and a function which receives a typed memoryview from which I would like to call the first function, e.g.:
def bar(DTYPE_t[:,::1] X not None):
foo(X[0])
Which naturally does not even compile. I've been trying for some hours now to figure out a way to access the data pointer underlying the memory view i.e. something like X.data
.
Is there a way to achieve this? I sadly can not adept foo
to accept memoryviews.