-
Notifications
You must be signed in to change notification settings - Fork 437
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
compilation failed with the new cython version (0.28) #1435
Comments
If I remember correctly, this comment (cython/cython#1453 (comment)) is exactly what we are doing, i.e. manually nulling the memview at creation and freeing it in dealloc. |
Check the travis error the message is clear. Memory views not allowed as struct members. |
And even if you nullify it the possibility for memory leak is still there. |
Basically, they are not allowing the code to compile when we add memviews inside structs. We can suggest to reconsider not changing this option. |
|
Perhaps changing from Data2D to float * will do the job? Let us know if you have time to hangout on this. We need to coordinate. |
Otherwise perhaps we can change from struct to class for structures with memviews? |
Okay @MarcCote the class idea was not good.
and then have functions to move from pointer to memview and memview to pointer
|
I like the Centroid2 struct idea. Do we really need the conversion functions, though? |
The data are coming in as memviews or numpy arrays. And you use 2D memviews internally too. So... probably yes. But if you think otherwise we would love to hear an alternative. |
I don't have a precise idea on how to do it. I wasn't able to install cython 0.28 on my machine. Is 0.28 officially released? |
This is a future release @MarcCote. Create a new environment and you can install it via :
|
fix by #1434, closing ! |
Description
As you can see on this build, the new Cython version (0.28) does not allow to use memoryviews as struct members.
In this discussion, it is hard to say if it will be something permanent or not.
BTW, We have to find a workaround.
The text was updated successfully, but these errors were encountered: