We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Get std::bad_cast when a callback return a Python complex type velue
test.py: def callback(): return complex(1.0,2.0) def test_foo(): foo(callback) bind.cpp: #include <nanobind/nanobind.h> #include <nanobind/stl/complex.h> #include <nanobind/stl/function.h> void foo(std::function<std::complex<double>()> func) { auto result = func(); } NB_MODULE(lib_ext, module) { module.def("foo", &foo); }
The text was updated successfully, but these errors were encountered:
Cannot reproduce. I think that there is a difference between the issue reported and the code to demonstrate it.
Sorry, something went wrong.
I'am so sorry! After checking my code, it turned out that I had an idiot mistake. Thank you for your help
No branches or pull requests
Problem description
Get std::bad_cast when a callback return a Python complex type velue
Reproducible example code
The text was updated successfully, but these errors were encountered: