-
Notifications
You must be signed in to change notification settings - Fork 205
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
[BUG]: problems with std::complex<long double> #708
Comments
What would you expect nanobind to do with a |
Well, there is Quick example (on x86_64):
This will print |
There is a big difference between nanobind and pybind11 here: pybind11 had NumPy integration. For this, it communicated (at runtime) with the low-level NumPy API, which in turn required NumPy to be installed. nanobind does not have a dependency on any particular Tensor API. It implements a generic You will need to create a wrapper that casts numeric types before binding them with nanobind. I will close this issue, since there isn't an obvious solution. |
Thanks for the explanation! |
Problem description
I'm trying to port an existing pybind11-dependent project to
nanobind
, with generally good success. But I'm encountering an issue where thedtype
ofstd::complex<long double>
is taken: the compiler warns that a constant of 256 (bit size?) is cast to 0, and the subsequent unit tests fail. Here is an excerpt of the compiler output:Is this something that should be working, or am I using
nanobind
incorrectly? I'm happy to work on a small reproducer if this is helpful.Reproducible example code
No response
The text was updated successfully, but these errors were encountered: