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
Replace use of Python/C API with numpy::array_view in _tri.cpp and qhull_wrap.c #19627
Comments
@ianthomas if you are not working on the issue can I take it up ? |
@rajpratyush I haven't started to work on this issue so if you would like to then please go ahead. I will unassign myself. My issue report gave an example of what to do for numpy arrays that are created in C/C++ and returned to Python. I've realised that Lines 275 to 283 in 200ebe1
needs to be more like matplotlib/src/_contour_wrapper.cpp Lines 36 to 44 in 200ebe1
If you have any questions then ask away. I know this part of the codebase pretty well. |
@ianthomas23 surely I would like to give it a try. |
Prettty sure that’s @ianthomas23 you’re looking for
…On Sun, Mar 14, 2021 at 11:54 PM Pratyush Raj ***@***.***> wrote:
@ianthomas <https://github.com/ianthomas> if you are not working on the
issue can I take it up ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACJANNDTBUZSSODN2VIADTDWAGNANCNFSM4YRHL23Q>
.
|
Converting |
I'd intended the minimal changes of renaming I hadn't considered switching to qhull's C++ API. It seems to me to be a work in progress and not fully nailed down, so unnecessarily risky for mpl to adopt. |
I opened a separate PR as it was quite a bit long to add to the first one. I didn't bother with the Qhull C++ API, which seems difficult to decipher. |
OK. I'm probably the most appropriate person to review both PRs so I'll assign myself. |
_tri.cpp
andqhull_wrap.c
use the Python/C API to create numpy arrays, e.g.:matplotlib/src/tri/_tri.cpp
Lines 638 to 639 in bc97294
It would be better to use our
numpy::array_view
wrappers instead, e.g.matplotlib/src/_contour.cpp
Line 440 in bc97294
as it is simpler and deals with reference counting and raising exceptions for us.
Self-assigning.
The text was updated successfully, but these errors were encountered: