--
---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cython-users/f676da31-1269-4675-8a17-8dfbf37e9a03n%40googlegroups.com.
It should be continuous, so I was hoping for something equivalent to c++11''s std::vector::data() which gives a valid pointer to the begin of the array even when empty.
--
---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cython-users/c6963a42-96ac-4b5f-a4e3-c3f81da4ca21n%40googlegroups.com.
If it's contiguous then you should declare it as double[::1] so enforce/document that.
I believe a memoryview slice should have a data attribute. it looks to be typed as char* so you'll have to cast it, but that's probably what you're after.
On Friday, June 4, 2021 at 3:12:46 PM UTC+1 jsr wrote:It should be continuous, so I was hoping for something equivalent to c++11''s std::vector::data() which gives a valid pointer to the begin of the array even when empty.
--
---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cython-users/f6e76841-e1c2-4293-8f45-4fee7c34d98cn%40googlegroups.com.
On Fri, Jun 4, 2021 at 12:02 PM D Woods <dw-...@d-woods.co.uk> wrote:If it's contiguous then you should declare it as double[::1] so enforce/document that.+1I believe a memoryview slice should have a data attribute. it looks to be typed as char* so you'll have to cast it, but that's probably what you're after.If this handles offsets correctly in the case of slicing (I don't remember), that could be a good option.