New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MemoryView doesn't support struct with a pointer inside #1995

Open
draplater opened this Issue Nov 12, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@draplater

draplater commented Nov 12, 2017

cdef struct Item:
double score
Item* left
Item* right

cdef Item[:,:,:] table = <Item[:sent_length, :sent_length, :label_count]> pool
                        ^

cdecoder.pyx:18:29: Invalid base type for memoryview slice: Item

Why pointer type is not valid?

@smutch

This comment has been minimized.

Show comment
Hide comment
@smutch

smutch Feb 25, 2018

Just wondering if there is any known work around for this? I have a large array of structs with pointers inside each member. I just need to be able to convert this to a numpy array, but am happy to skip the pointers. I've spent a lot of time trying to do this, but to no avail...

smutch commented Feb 25, 2018

Just wondering if there is any known work around for this? I have a large array of structs with pointers inside each member. I just need to be able to convert this to a numpy array, but am happy to skip the pointers. I've spent a lot of time trying to do this, but to no avail...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment