Skip to content
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

Evaluate if wrapping functions that accept std::function (callbacks) are easily possible #165

Open
jpfeuffer opened this issue Sep 29, 2022 · 0 comments

Comments

@jpfeuffer
Copy link
Contributor

Should work with wrapped extension and primitive types.

https://stackoverflow.com/questions/45943940/cython-stdfunction-callbacks-with-custom-parameter-types
https://stackoverflow.com/questions/39044063/pass-a-closure-from-cython-to-c/39052204#39052204
https://github.com/hildensia/py_c_py

If possible without using boost::python, but it would not be a dealbreaker, if it can be made optional.

Some similar manual things were done here:
https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/extra_includes/python_ms_data_consumer.hpp
https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/pxds/PythonMSDataConsumer.pxd
https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/addons/MzMLFile.pyx

Applications for e.g. OpenMS would be apply functions for large in-memory MSExperiments, to apply an algorithm (written in Python via our wrappers) to each spectrum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant